Sending SMS from excel VBACURL Equivalent to POST JSON data using VBAHow to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Is there a way to crack the password on an Excel VBA Project?Redirect from an HTML pageIs it possible to force Excel recognize UTF-8 CSV files automatically?Parsing JSON in Excel VBASend POST data using XMLHttpRequestHow to avoid using Select in Excel VBAFix Protocol with Excel VBAHow do I return the response from an asynchronous call?VBA application on excel

Non-trope happy ending?

Calculating total slots

Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?

It grows, but water kills it

Lowest total scrabble score

How does the math work for Perception checks?

Moving brute-force search to FPGA

Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Why does a simple loop result in ASYNC_NETWORK_IO waits?

The IT department bottlenecks progress. How should I handle this?

Can disgust be a key component of horror?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Does malloc reserve more space while allocating memory?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset

Yosemite Fire Rings - What to Expect?

Why "had" in "[something] we would have made had we used [something]"?

I'm the sea and the sun

Quoting Keynes in a lecture

What is the highest possible scrabble score for placing a single tile

How to explain what's wrong with this application of the chain rule?

Creepy dinosaur pc game identification

Pre-mixing cryogenic fuels and using only one fuel tank



Sending SMS from excel VBA


CURL Equivalent to POST JSON data using VBAHow to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Is there a way to crack the password on an Excel VBA Project?Redirect from an HTML pageIs it possible to force Excel recognize UTF-8 CSV files automatically?Parsing JSON in Excel VBASend POST data using XMLHttpRequestHow to avoid using Select in Excel VBAFix Protocol with Excel VBAHow do I return the response from an asynchronous call?VBA application on excel













2















I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:



POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp

"messages": [



"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"

]



From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.










share|improve this question



















  • 1





    Check this

    – omegastripes
    Mar 7 at 7:55















2















I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:



POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp

"messages": [



"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"

]



From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.










share|improve this question



















  • 1





    Check this

    – omegastripes
    Mar 7 at 7:55













2












2








2








I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:



POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp

"messages": [



"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"

]



From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.










share|improve this question
















I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:



POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp

"messages": [



"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"

]



From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.







html excel vba post xmlhttprequest






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 9:55









omegastripes

8,53422158




8,53422158










asked Mar 7 at 6:33









Phil APhil A

343




343







  • 1





    Check this

    – omegastripes
    Mar 7 at 7:55












  • 1





    Check this

    – omegastripes
    Mar 7 at 7:55







1




1





Check this

– omegastripes
Mar 7 at 7:55





Check this

– omegastripes
Mar 7 at 7:55












1 Answer
1






active

oldest

votes


















2














Here is the basic sample, which should make an HTTP POST request with the specified parameters:



Sub Test()

Dim oXHR As Object
Dim sPayload As String

sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""

Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With

End Sub





share|improve this answer























  • Awesome thanks for that. Only need to get the authorization to work.

    – Phil A
    Mar 8 at 21:53











  • @PhilA Modify Authorization header setting as shown in this answer.

    – omegastripes
    Mar 9 at 9:47










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037447%2fsending-sms-from-excel-vba%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Here is the basic sample, which should make an HTTP POST request with the specified parameters:



Sub Test()

Dim oXHR As Object
Dim sPayload As String

sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""

Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With

End Sub





share|improve this answer























  • Awesome thanks for that. Only need to get the authorization to work.

    – Phil A
    Mar 8 at 21:53











  • @PhilA Modify Authorization header setting as shown in this answer.

    – omegastripes
    Mar 9 at 9:47















2














Here is the basic sample, which should make an HTTP POST request with the specified parameters:



Sub Test()

Dim oXHR As Object
Dim sPayload As String

sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""

Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With

End Sub





share|improve this answer























  • Awesome thanks for that. Only need to get the authorization to work.

    – Phil A
    Mar 8 at 21:53











  • @PhilA Modify Authorization header setting as shown in this answer.

    – omegastripes
    Mar 9 at 9:47













2












2








2







Here is the basic sample, which should make an HTTP POST request with the specified parameters:



Sub Test()

Dim oXHR As Object
Dim sPayload As String

sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""

Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With

End Sub





share|improve this answer













Here is the basic sample, which should make an HTTP POST request with the specified parameters:



Sub Test()

Dim oXHR As Object
Dim sPayload As String

sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""

Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With

End Sub






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 7 at 8:15









omegastripesomegastripes

8,53422158




8,53422158












  • Awesome thanks for that. Only need to get the authorization to work.

    – Phil A
    Mar 8 at 21:53











  • @PhilA Modify Authorization header setting as shown in this answer.

    – omegastripes
    Mar 9 at 9:47

















  • Awesome thanks for that. Only need to get the authorization to work.

    – Phil A
    Mar 8 at 21:53











  • @PhilA Modify Authorization header setting as shown in this answer.

    – omegastripes
    Mar 9 at 9:47
















Awesome thanks for that. Only need to get the authorization to work.

– Phil A
Mar 8 at 21:53





Awesome thanks for that. Only need to get the authorization to work.

– Phil A
Mar 8 at 21:53













@PhilA Modify Authorization header setting as shown in this answer.

– omegastripes
Mar 9 at 9:47





@PhilA Modify Authorization header setting as shown in this answer.

– omegastripes
Mar 9 at 9:47



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037447%2fsending-sms-from-excel-vba%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved