One request, one message
Authenticate with your access key, POST the message, and read the msgid from the response. Press the button to see it run.
1curl -X POST https://secure.smslocal.com/api/service/enterprise-service/external/sms \
2 -H "Token: $SMSLOCAL_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "from": "SMSLOCAL",
6 "to": "14155550123",
7 "content": "Your code is 481920."
8 }'
/external/smsRun the request to see the response.
Nothing exotic to learn
Three ideas cover the whole API, which follows plain REST conventions.
- Authentication
Token authentication
Send your access key in a Token header on every request, with JSON in and JSON out.
- No SDK required
- Works from any language
- Keep the key in an environment variable
- 応答
Know it was accepted
Every send returns a msgid and an errorcode immediately.
- Store the msgid against your own record
- errorcode 0 means accepted
- Use the msgid to match reports later
- Replies
Two-way by default
Replies arrive on the same callback, marked as mobile originated.
- Same message shape as reports
- Tell directions apart with mt / mo
- Route replies to your support tools
See what happened to every message
A status report is posted to your callback URL when a message reaches its final state.
- 1Match by msgidEvery report carries the ID you were given at send time.
- 2Final states onlyYou hear about a message when it is delivered or has failed.
- 3One callback URLThe same endpoint receives reports and replies.
9f2a7c10+1 415 ••• 0123納品済みjust now9f2a7c11+91 98••• 43210納品済み3 s ago9f2a7c12+44 7••• 123456保留中5 s ago9f2a7c13+91 99••• 00012Failed9 s ago
See how a message is counted
Longer text and non-Latin characters change how many parts a message is billed as. Try your own wording, and look up a number before you send.
- 一部 146 / 160
1 つの部分には、GSM7 の場合は 160 文字、Unicode の場合は 70 文字が含まれます。絵文字やヒンディー語文字などの 1 つの非 GSM 文字により、メッセージ全体が Unicode に切り替わります。
メッセージを手作業で貼り付けるのはやめましょう
分割線をドラッグして比較します。
- 独自のコードから送信されたメッセージ
- すべてのメッセージのレポート
- 応答がシステムにプッシュされる
- 手動でのエクスポートとアップロード
- メッセージが届いたかどうかわからない
- 返信が誰かの受信箱に届く
短い発売前チェックリスト
途中で項目にチェックを入れます。ここでは何も保存されません。
SMS API — よくある質問
Content-Type: application/json とともに、すべてのリクエストの Token ヘッダーでアクセス キーを渡します。
送信するたびに msgid が返されます。コールバック URL を指定すると、メッセージが最終状態に達したときにステータス レポートがその URL に投稿されます。
GSM7 エンコードでは 160 文字、Unicode では 70 文字。長いメッセージは複数の部分から結合され、それぞれ個別に請求されます。
はい。受信応答は同じコールバック URL に配信され、モバイル発信としてマークされます。
はい。インドの番号への SMS では、承認されたエンティティ、送信者ヘッダー、およびテンプレートを使用する必要があります。私たちのチームは、オンボーディング中にそれらを登録するのをお手伝いします。