SMS is sent by generating a specially-crafted request to the Skyetel SMS API and using an SID and Secret you have created for this purpose.
Generating and obtaining an SID and Secret
Skyetel allows you to create your own SID and Secret and later remove it when it is no longer used. These can be generated by visiting your Skyetel portal by clicking on the gear icon in the top right corner of our portal.
Sending a SMS or MMS
Here is an example of performing that request using the curl
command-line tool in Linux or Unix:
curl -X POST -v \
-H "Content-type: application/json" \
--user <SID>:<SECRET> \
--data '{ "to": "15558001234", "text": "You are awesome" }' \
https://sms.skyetel.com/v1/out?from=15558004321
A similar format may be used for Windows curl
command-line testing:
curl -X POST -v -H "Content-type: application/json" --user <SID>:<SECRET> --data "{ \"to\": \"15558001234\", \"text\": \"You are awesome\" }" https://sms.skyetel.com/v1/out?from=15558004321
In the to field provide your the correct 11-digit destination phonenumber; and provide you SMS-enabled source phonenumber in the from field.
Required header fields
Field
|
Data Type
|
Example Usage
|
---|---|---|
Authorization | "Basic" followed by a base64 encoding of a string that includes your SID and Secret separated by a colon ':' |
Authorization: Basic RXhhbXBsZTpFeGFtcGxl |
Content-type | "application/json" is required to verify the kind of data being sent |
Content-type: application/json |
Required fields in data
Field
|
Data Type
|
Example
|
---|---|---|
to (required) |
11-digit phonenumber |
"15558004242" |
text (required) |
String up to 1024 characters |
"Never gonna give you up; never gonna let you down" |
media (optional) |
One or more accessible links to media files. Maximum of 1.5 MB total. |
[ "https://media.giphy.com/media/LXONhtCmN32YU/giphy-tumblr.gif", |
Example SMS Message Body (Sending)
{
"to": "15558001234",
"text": "ARRR! THE SHIP BE SINKING!",
"media": [ "https://media.giphy.com/media/3o6ZtihIv0pJqdp3H2/giphy.gif" ]
}
Required URL query fields
Field
|
Data Type
|
Example Usage
|
---|---|---|
from | 11-digit Skyetel message-enabled phonenumber |
from=15558004321 |
Rate Limits
By default, we rate limit SMS Send requests to 300 sends within a 5 minute window (so 1 message per second). If you exceed this limit, you will start receiving "403 Forbidden" warnings. You will automatically be unblocked after a 5 minute cool down.Receiving SMS or MMS
You need to configure your Skyetel Phone Number to post to your endpoint via our portal. You can do that by selecting your phone number and choosing the destination and method on the SMS tab:
Example SMS Message Body (Receiving)
{
"to": "13609865200",
"from": "15558001234",
"text": "You just lost the game"
}
"media": [ "list", "of", "urls" ]
Troubleshooting
Unauthorized Error
- Check that your SID and Secret are correct
- Check that the your 11-digit from phone number is accurate, in a GOOD lifecycle state, and SMS-enabled
- Check that you have a positive Skyetel balance
Message Not Received
- Wait up to 3 minutes especially for MMS messages that include multiple attachments
- Check that your media attachments are not large than 1.5MB
- Make sure your media or attachment is a supported type
- Check that your recipient phone number is correct and able to receive messages
- Try a separate recipient phone number
- Open a Skyetel portal support ticket
Message received without media
- Make sure your recipient supports the media attachment that you are sending
Supported File Type Attachments
Media Files
.ogv, .oga, .ogx, .ogg, .avi, .mp4, .m4v, .mpg, .mpeg, .m1v, .mpv, .spx, .ogm, .mov, .qt, .webm, .wmv, .flv, .m4a, .m4p, .m4b, .m4r, .mp1, .mp2, .mp3, .m1a, .m2a, .mpa, .flac, .webm, .wav, .amr, .3ga, .3gp, .bmp, .dib, .gif, .jpg, .jpeg, .pjpeg, .png, .svg, .tiff, .tif, .webp, .ico
Attachments
.json, .pdf, .rtf, .zip, .tar, .xml, .gz, .bz2, .gz, .smil, .js, .csv, .html, .cal, .txt, .js, .vcf, .vcard, .wap, .xml