ここから開始
4 つのステップで最初のリクエストを実行します
Keep your main SMSMobileAPI subscription active; Telegram connection, API access, sending and sent-message history pause when it expires.
ダッシュボードで QR code によってご自身の Telegram アカウントを接続し、連絡先を同期してください。
My API Key から SMSMobileAPI キーをコピーし、サーバーに安全に保管してください。
連絡先を一覧表示し、送信先のcontact_idをコピーしてください。
Send JSON for text, or multipart/form-data to attach an image or document. Use the returned message_id to check the sent log.
YOUR TELEGRAM ACCOUNT
接続して連絡先を選び、送信を追跡してください。
各顧客は自分の Telegram アカウントを接続するために QR code をスキャンします。ダッシュボードで連絡先を同期し、返された連絡先 ID でメッセージをキューに入れ、送信ログでステータスを確認してください。
1接続する
Telegram ダッシュボードページで QR code をスキャンしてください。
2連絡先を検索
同期後、API を通じて contact ID を検索してください。
3送信
冪等性キーを付けてJSONメッセージを1件POSTしてください。
4追跡
キュー、送信済み、不明、エラーの各状態を読み取ります。
認証
認証情報をサーバー上に保持します
Send X-SMSMobileAPI-Key: YOUR_API_KEY in an HTTPS header. Keep this key on your server, never in browser JavaScript or a public repository. The endpoints are scoped to the Telegram account connected to that SMSMobileAPI account. A short-lived signed download_url can be opened without the key. Access can be disabled in My API Key.
- An expired SMSMobileAPI subscription blocks Telegram API access with HTTP 402 subscription_expired, including attachment downloads. Renew in the dashboard to restore access; existing connection and history are preserved.
- QR code は各顧客の Telegram アカウントをリンクします。メッセージは共有の SMSMobileAPI アカウントではなく、そのアカウントから送信されます。
- 202レスポンスはリクエストがキューに入ったことを意味します。Telegram がメッセージを受理または配信したことを証明するものではありません。送信ログを照会して送信済みかエラーかを確認してください。
- このサービスは現時点でリクエストごとに同期された1件の連絡先または保存された @username にのみ送信します。Telegram の規則と受信者の同意を尊重してください。
- リクエストは1分あたり15件の新規メッセージ、接続されたアカウントごとに30件のキュー済みメッセージに制限されています。再試行時は安定した idempotency_key を使用してください。
- Images and documents can be up to 5 MB. The send queue holds file bytes only until processing finishes; a separate private copy supports later downloads. File bytes are never embedded in the sent log.
- Newly sent attachments are kept in private storage for 90 days. The sent log returns a download_url valid for 15 minutes; request the log again to get a new link. Older attachments sent before this feature have no downloadable copy.
得る
Telegramの連絡先一覧
https://api.smsmobileapi.com/telegram/contacts/接続された Telegram アカウントで利用可能な連絡先を返します。
表示名または @username で検索し、contact_id を使って送信してください。
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
q |
弦 | 任意 | 任意の名前またはユーザー名で検索、最大80文字。 |
limit |
整数 | 任意 | ページサイズは1〜100。デフォルトは50。 |
cursor |
整数 | 任意 | 前回のレスポンスの paging.next_cursor を使用してください。最初のページでは省略してください。 |
リクエストの例
curl -G 'https://api.smsmobileapi.com/telegram/contacts/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
--data-urlencode 'q=Alex' \
--data-urlencode 'limit=50'
回答例
{"ok":true,"data":[{"contact_id":42,"display_name":"Alex Example","username":"alex_example","source":"telegram"}],"paging":{"has_more":false,"next_cursor":null}}
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- 連絡先 ID は接続済みアカウントに属します;別のアカウントの ID は使用できません。
- 新しい連絡先が表示されない場合は、ダッシュボード → Telegram Contacts で連絡先を更新してください。
役職
Telegram メッセージを送信してください。
https://api.smsmobileapi.com/telegram/send/接続されたTelegramアカウントから連絡先宛てにテキストメッセージをキューに入れます。
contacts エンドポイントの contact_id を使用してください。トラッキングのため message_id を保存してください。
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
contact_id |
整数 | 必須 | /telegram/contacts/ が返す連絡先 ID。 |
message |
弦 | 必須 | UTF-8 テキスト、1〜4096文字、最大16,000バイト。 |
idempotency_key |
UUID 文字列 | 任意 | 安定した36文字の小文字UUID形式キー。ネットワーク再試行時に再利用して重複メッセージを回避してください。 |
リクエストの例
curl -X POST 'https://api.smsmobileapi.com/telegram/send/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"contact_id":42,"message":"Your appointment is confirmed.","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161"}'
回答例
{"ok":true,"message_id":123,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- HTTP 202 はキュー化を意味し、配信確認ではありません。同一の再試行は HTTP 200 を返し、duplicate=true と元の message_id が付与されます。
- 再試行する場合は、同じ連絡先とメッセージで同じ idempotency_key を再利用してください。同じキーでペイロードが変更されていると HTTP 409 が返されます。
役職
Send a Telegram image or document
https://api.smsmobileapi.com/telegram/send/Queue one file for a contact, with an optional caption.
Use multipart/form-data. The field name for the attachment is file.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
contact_id |
整数 | 必須 | /telegram/contacts/ が返す連絡先 ID。 |
file |
file | 必須 | One JPG, PNG, WebP, PDF, TXT, CSV, JSON, ZIP or Office file, at most 5 MB. |
message |
弦 | 任意 | Optional caption of at most 1024 characters. |
idempotency_key |
UUID 文字列 | 任意 | Reuse the same key and identical file and caption when retrying. |
リクエストの例
curl -X POST 'https://api.smsmobileapi.com/telegram/send/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
-F 'contact_id=42' \
-F 'message=Here is the document.' \
-F 'file=@./document.pdf' \
-F 'idempotency_key=2d40bb10-cc42-4c30-a282-93fc6dd8e161'
回答例
{"ok":true,"message_id":124,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- Do not set Content-Type manually; cURL adds the multipart boundary.
- For JSON clients, send file_base64 with the Base64 file contents and filename, alongside contact_id and an optional message caption.
- A queued response is not proof of delivery. Check GET /telegram/sent/?message_id=124.
- The connected Telegram account sends the file to one contact.
役職
Send a Telegram file using JSON
https://api.smsmobileapi.com/telegram/send/Queue one image or document using a Base64 string when multipart upload is inconvenient.
Encode the original file bytes with Base64. Do not include an API key in the JSON body.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
contact_id |
整数 | 必須 | /telegram/contacts/ が返す連絡先 ID。 |
filename |
弦 | 必須 | Original file name, for example photo.png or invoice.pdf. |
file_base64 |
弦 | 必須 | Raw Base64 file contents or a data URI; decoded file must be 5 MB or smaller. |
message |
弦 | 任意 | Optional caption of at most 1024 characters. |
idempotency_key |
UUID 文字列 | 任意 | Reuse the same key with identical file contents, filename and caption on retries. |
リクエストの例
curl -X POST 'https://api.smsmobileapi.com/telegram/send/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"contact_id":42,"filename":"photo.png","file_base64":"BASE64_ENCODED_FILE","message":"See attached","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161"}'
回答例
{"ok":true,"message_id":125,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- Replace BASE64_ENCODED_FILE with the actual Base64 of a supported file.
- Use multipart/form-data instead if your client supports direct file upload; it avoids Base64 size overhead.
得る
送信済みTelegramメッセージ一覧
https://api.smsmobileapi.com/telegram/sent/最近のキュー済み、送信中、送信済み、失敗したメッセージを新しい順で返します。
このエンドポイントを message_id でポーリングして、/telegram/send/ が返すメッセージを追跡します。
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
message_id |
整数 | 任意 | /telegram/send/ が返す特定のメッセージIDを返します。 |
contact_id |
整数 | 任意 | 結果を1つのコンタクトIDに限定します。 |
status |
queued | sending | sent | error | unknown | 任意 | 送信状態でフィルタリング |
limit |
整数 | 任意 | ページサイズは1〜100。デフォルトは50。 |
cursor |
整数 | 任意 | 古いメッセージを取得するには paging.next_cursor を使用してください。 |
リクエストの例
curl -G 'https://api.smsmobileapi.com/telegram/sent/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
--data-urlencode 'message_id=123'
回答例
{"ok":true,"data":[{"message_id":123,"contact_id":42,"contact_name":"Alex Example","username":"alex_example","message":"Your appointment is confirmed.","type":"text","media":null,"status":"sent","telegram_message_id":781,"error_code":null,"error_detail":null,"attempts":1,"queued_at":"2026-11-06T09:42:00+00:00","sent_at":"2026-11-06T09:42:04+00:00"}],"paging":{"has_more":false,"next_cursor":null}}
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- The top-level type is text, image or file. For an attachment, media contains the filename, MIME type, size, download_url and available_until; media is null for text messages. File bytes are not embedded in the log.
- The download_url opens in a browser for 15 minutes. Refresh this endpoint for a new link while the file remains available.
- sent は接続されたアカウントから Telegram がメッセージを受け付けたことを意味します。受信者の配信や既読は報告されません。
- unknown は送信結果を確認できなかったことを意味します。この状態で安易にメッセージを再送しないでください。
得る
Download a sent Telegram attachment
https://api.smsmobileapi.com/telegram/media/Downloads a previously sent image or document while it remains available.
Use media.download_url from the sent log, or call this endpoint with the account API key.
パラメータ
| 名前 | タイプ | 要件 | 説明 |
|---|---|---|---|
message_id |
整数 | 必須 | Message ID returned by /telegram/send/. |
リクエストの例
curl -L 'https://api.smsmobileapi.com/telegram/media/?message_id=124' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
-o attachment
回答例
Binary image or document bytes (Content-Type matches the file)
これを実行したいrequest?インタラクティブなテスターをアンロックするために、ページの上部にあるAPIキーを接続します。
接続キー ↑- A download_url returned by /telegram/sent/ is signed and works without an API key for 15 minutes. Keep it private.
- The authenticated endpoint requires the Telegram sent-log API access switch.
- Files are retained for 90 days; the type and filename remain in the log after expiry.
トラブルシューティング
エラーと安全な再試行
再試行する前に、HTTP ステータスと JSON エラー フィールドを読み取ります。最初にリクエストを修正せずに、検証または認証の失敗を再試行しないでください。
| HTTP | コード | 対処方法 |
|---|---|---|
| 401 | api_key_required / invalid_api_key | 有効な X-SMSMobileAPI-Key ヘッダーを送信してください。 |
| 402 | subscription_expired | Renew the SMSMobileAPI subscription linked to the API key. Telegram API access resumes after renewal. |
| 403 | API_ENDPOINT_DISABLED | My API Key で Telegram API またはこの特定のエンドポイントを有効にしてください。 |
| 404 | contact_not_found | 連絡先を同期し、独自の Telegram 接続からの ID を使用してください。 |
| 409 | telegram_not_connected / idempotency_conflict | Telegram を接続するか、内容を変更した場合は新しい冪等キーを選択してください。 |
| 422 | invalid_message / invalid_pagination | メッセージ、連絡先 ID、またはページングパラメータを修正してください。 |
| 429 | queue_full / rate_limited | キューに入った送信または1分あたりの制限が解除されるのを待ってください。 |
| 503 | sending_unavailable / service_unavailable | 送信ワーカーまたはストレージが一時的に利用できません。後で再試行してください。 |
| 503 | media_not_ready | File sending requires the current Telegram service update. Text sending remains available. |
| 404 / 410 | media_not_found / media_expired | The file is unavailable or past its 90-day retention period. |
ヘルプが必要ですか?
シークレットではなくリクエスト コンテキストを提供します。
エンドポイント、タイムスタンプ、HTTP ステータス、サニタイズされたレスポンスを共有します。 API キー、トークン、プライベート メッセージ コンテンツは決して含めないでください。
オフィシャルモバイルアプリケーション
電話、ダッシュボード、API間の安全な橋。
SMS とコール操作は、接続された電話にインストールされている公式 SMSMobileAPI アプリを通過します。 アプリは、アカウントでデバイスを安全にペアリングし、認定イベントを同期し、モバイルネットワークをダッシュボードとREST APIにリンクします。
- 正式なGoogle PlayとApple App Storeの一覧で配布されたサインされたリリース
- GoogleとAppleプラットフォームのレビュー、署名、配布制御
- セキュアなデバイスペアリング、HTTPS の輸送および認証 API アクセス
- 有効にできるモバイル機能に必要な権限のみ


