SMS - Try it without code
This page explains how to send a text message using Telesign SMS directly from our docs site without writing any code. This is a convenient way to test out the service before coding your integration or to learn more about how the API works.
Before you begin
Ensure that you have the following:
- Authentication credentials: Your Customer ID and API Key. If you need help finding these items, see How do I find my Customer ID and API Key.
Steps
CAUTION:
Using your account credentials in the API Explorer to make a request results in your account being charged for the transaction.
You are subject to all compliance rules as appropriate for your transaction.
-
Open the reference page for the POST https://rest-ww.telesign.com/v1/messaging endpoint.
-
Go to the AUTHENTICATION header in the upper-right panel of the page. Enter your Customer ID in the Customer ID field and your API Key in the API Key field.
-
Go to the FORM DATA section in the middle panel of the page. In the phone_number field enter the phone number you want to send a message to. Be sure to include the country code and avoid using any special characters or spaces. Typically this would be the phone number for a test device that you control.
-
In the message field enter a test message to send to the end user such as "hello world".
-
In the message_type field enter a Telesign abbreviation that specifies the message type such as "MKT" for a marketing message. (The description of the message_type field on this same reference page includes a list of allowed values you can use).
-
Select Try It! in the right panel to send your request to Telesign. You will be charged the standard rate for this transaction. Congratulations! You've sent your first text message using Telesign SMS!
-
You can also select the copy icon to the left of Try It! to copy the code snippet displayed. To change the programming language of the snippet, select one of the options under the LANGUAGE header in the right sidebar.
Example
POST /v1/messaging HTTP/1.1
Authorization: Basic 12345678-9ABC-DEF0-1234-56789ABCDEF0:Uak4fcLTTH/Tv8c/Q6QMwl5t4ck=
Content-Type: application/x-www-form-urlencoded
Host: rest-ww.telesign.com
phone_number=15551212&message=Your message here.&account_lifecycle_event=create&originating_ip=203.0.113.45&external_id=CustomExternalID7349
HTTP/1.1 200 OK
Content-Type: application/json
{
"external_id": "CustomExternalID7349",
"reference_id": "0123456789ABCDEF0123456789ABCDEF",
"phone_number_modified": "False",
"status": {
"code": 290,
"updated_on": "2017-31-03T14:51:28.709526Z",
"description": "Message in progress"
}
}
Updated 9 months ago