Page 1 of 1
SMS API by Textbelt
Posted: 13 Jul 2017, 10:33
by BoBo
SMS API | Textbelt is an SMS gateway API. There are two versions:
For a free, self-hosted SMS server, head over to the
[open source project].
For a reliable, zero-setup solution,
[read here below] and generate an API key.
Since its creation, Textbelt has sent over 3 million texts from the command line and other software clients!
Would be interested to see an AHK code snippet to handle this conveniently for monitoring purposes
Re: SMS API by Textbelt
Posted: 13 Jul 2017, 22:52
by Bobos friend
That's cool thank you I will look into it tonight
Re: SMS API by Textbelt
Posted: 20 Jul 2017, 09:49
by TheDewd
Too expensive.
Here's code to send a "test message". Only once per day.
Code: Select all
#SingleInstance, Force
ObjHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
ObjHTTP.Open("POST", "https://textbelt.com/text")
ObjHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
ObjHTTP.Send("phone=5555555555&message=Hello%20world&key=textbelt")
MsgBox, % ObjHTTP.ResponseText
Re: SMS API by Textbelt
Posted: 20 Jul 2017, 10:20
by BoBo
TheDewd wrote:Too expensive.
Here's code to send a "test message". Only once per day.
Code: Select all
#SingleInstance, Force
ObjHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
ObjHTTP.Open("POST", "https://textbelt.com/text")
ObjHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
ObjHTTP.Send("phone=5555555555&message=Hello%20world&key=textbelt")
MsgBox, % ObjHTTP.ResponseText
Unfortunately, it throws that error (and yes, I've changed the phone# and followed below mentioned requirement):
{"success":false,"error":"Invalid phone number or bad request. If your phone number contains a +, please check that you are URL encoding it properly."}
... but if I'm sending it using the test-parameter
... &message=Hello%20world&key=textbelt_test") it is looking fine:
{"success":true,"textId":"23761500564424078","quotaRemaining":1}
To text internationally, use the E.164 format (+ country code with numbers, no spaces). For example, a Brazilian phone number is +5511912345678 and a UK phone number is +447712345678.
Re: SMS API by Textbelt
Posted: 20 Jul 2017, 10:23
by TheDewd
This is the result I get:
{"success":false,"error":"Only one test text message is allowed per day.","quotaRemaining":0}