SMS API by Textbelt

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

SMS API by Textbelt

13 Jul 2017, 10:33

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]. :thumbup:
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 :)
Bobos friend

Re: SMS API by Textbelt

13 Jul 2017, 22:52

That's cool thank you I will look into it tonight
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: SMS API by Textbelt

20 Jul 2017, 09:49

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
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: SMS API by Textbelt

20 Jul 2017, 10:20

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.
:|
Last edited by BoBo on 20 Jul 2017, 10:28, edited 2 times in total.
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: SMS API by Textbelt

20 Jul 2017, 10:23

This is the result I get:
{"success":false,"error":"Only one test text message is allowed per day.","quotaRemaining":0}

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 18 guests