HTTP Interface for SMS

Applicability: TGv2, TGv3

 

TG provides a HTTP interface to enable your applications to send messages over the internet. You can send SMS message using the HTTP interface. Parameters are specified in the URL.

Note: Limit your sending speed to 1 SMS per 10 seconds for 1 port when using this API.

Also, you could refer to the video guide: How To Use TG SMS HTTP API (Video)

Sending SMS format:
http://[IP]/cgi/WebCGI?1500101=account=[user]&password=[pass]&port=[port]&destination=[phone_number]&content=[MSG]

Sending USSD format:
http://[IP]/cgi/WebCGI?1500102=account=[user]&password=[pass]&port=[port]&content=[MSG]

Please check the following example SMS message from web.
If you want to send a message "Hello world!!" to phone number 15880270900 through TG GSM port 1.

The API settings are configured as the following picture shows:


As we can see, the [User] should be apiuser, and the [pass] should be password.


The URL format should be like this:
http://192.168.5.176/cgi/WebCGI?1500101=account=apiuser&password=password&port=1&destination=15880270900&content=Hello+world!!

For the content, it is better to convert it to URL Encode. 

You might find a tool in the Internet like this web tool: URL Encode Decode

Test

You can try to enter the whole URL in the browser address bar.

If the test result is good, you will get the response:

mceclip1.png

Request Sample

If you use the API via your own application. The HTTP method should be GET.

mceclip0.png

 

Have more questions? Submit a request

31 Comments

  • 0
    Avatar
    Vince Ph

    Hi,

    Is there anyone who has experience in api integration to get all messages from TG800 inbox?

    please let me know the Url Request. Thanks

Please sign in to leave a comment.