Skip to content

Instantly share code, notes, and snippets.

@secretshardul
Last active February 7, 2020 13:46
Show Gist options
  • Save secretshardul/8964824da5482ac76f88d0a8c9afb717 to your computer and use it in GitHub Desktop.
Save secretshardul/8964824da5482ac76f88d0a8c9afb717 to your computer and use it in GitHub Desktop.
How to send SMS from Textlocal API using Postman and CURL. Here I have used POST method.
  1. HTTP specifications TextLocal API accepts input in application/x-www-form-urlencoded format.
POST /send/ HTTP/1.1
Host: api.textlocal.in
Content-Type: application/x-www-form-urlencoded
Accept: */*

apiKey=<your_API_key>&message=sent+by+me+from+textlocal+API&numbers=<phone_numbers_separated_by_commas>&test=true

Set test=true for a trial API call if you don't want to incur charges.

  1. Postman

send_SMS_postman

  1. Curl
curl -X POST \
  http://api.textlocal.in/send/ \
  -d 'apiKey=<your_API_key>&message=sent%20by%20me%20from%20textlocal%20API&numbers=<phone_numbers_separated_by_commas>&test=true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment