Start hier
Uw eerste verzoek in vier stappen
Keep your main SMSMobileAPI subscription active; Telegram connection, API access, sending and sent-message history pause when it expires.
Verbind je eigen Telegram-account door QR code in het dashboard en synchroniseer de contacten.
Kopieer je SMSMobileAPI-sleutel van My API Key en bewaar deze op je server.
Lijst met contacten en kopieer de contact_id van de gewenste ontvanger.
Send JSON for text, or multipart/form-data to attach an image or document. Use the returned message_id to check the sent log.
UW TELEGRAMACCOUNT
Verbind, kies een contact en volg vervolgens het verzendproces.
Elke klant scant een QR code om zijn eigen Telegram-account te verbinden. Synchroniseer contacten in het dashboard, gebruik de geretourneerde contact-ID om een bericht in de wachtrij te zetten en controleer vervolgens de status in het verzondenlogboek.
1Verbinden
Scan de QR code op de Telegram-dashboardpagina.
2Zoek een contact
Synchroniseer en zoek vervolgens het contact-ID via API.
3Versturen
POST één JSON-bericht met een idempotency key.
4Track
Lees queued, sent, unknown of error statussen.
Authenticatie
Houd referenties op uw server
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.
- De QR code koppelt ieders eigen Telegram-account. Berichten worden vanaf dat account verzonden, niet vanaf een gedeeld SMSMobileAPI-account.
- Een 202-respons betekent dat het verzoek in de wachtrij is geplaatst. Het bewijst niet dat Telegram het bericht heeft geaccepteerd of afgeleverd. Raadpleeg het verzondenlogboek op 'sent' of 'error'.
- De service verzendt momenteel per verzoek naar één gesynchroniseerd contact of opgeslagen @gebruikersnaam. Respecteer Telegram-regels en toestemming van de ontvanger.
- Verzoeken zijn beperkt tot 15 nieuwe berichten per minuut en 30 in de wachtrij per verbonden account. Gebruik een stabiele idempotency_key bij het opnieuw proberen.
- 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.
KRIJGEN
List Telegram contacts
https://api.smsmobileapi.com/telegram/contacts/Geeft contactpersonen terug die beschikbaar zijn in uw verbonden Telegram-account.
Zoek op weergavenaam of @gebruikersnaam en gebruik vervolgens contact_id om te verzenden.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
q |
tekenreeks | Facultatief | Optionele naam- of gebruikersnaamszoekopdracht, maximaal 80 tekens. |
limit |
geheel getal | Facultatief | Paginagrootte van 1 tot 100; standaard 50. |
cursor |
geheel getal | Facultatief | Gebruik paging.next_cursor uit de vorige respons; weg laten voor de eerste pagina. |
Voorbeeld aanvragen
curl -G 'https://api.smsmobileapi.com/telegram/contacts/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
--data-urlencode 'q=Alex' \
--data-urlencode 'limit=50'
Voorbeeldantwoord
{"ok":true,"data":[{"contact_id":42,"display_name":"Alex Example","username":"alex_example","source":"telegram"}],"paging":{"has_more":false,"next_cursor":null}}
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- Contact-ID's horen bij het verbonden account; een ID van een ander account kan niet worden gebruikt.
- Ververs contacten via Dashboard → Telegram Contacts wanneer iemand nieuw niet verschijnt.
NA
Stuur een Telegram-bericht
https://api.smsmobileapi.com/telegram/send/Zet één tekstbericht in de wachtrij voor een contact uit je verbonden Telegram-account.
Gebruik contact_id van het contacts-endpoint. Bewaar message_id voor tracking.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
contact_id |
geheel getal | Vereist | Contact-ID geretourneerd door /telegram/contacts/. |
message |
tekenreeks | Vereist | UTF-8-tekst, 1–4096 tekens en maximaal 16.000 bytes. |
idempotency_key |
UUID-string | Facultatief | Stabiele 36-teken kleine letters UUID-achtige sleutel. Hergebruik bij netwerkretries om dubbele berichten te voorkomen. |
Voorbeeld aanvragen
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"}'
Voorbeeldantwoord
{"ok":true,"message_id":123,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- HTTP 202 means queued; it is not a delivery receipt. An exact retry returns HTTP 200 with duplicate=true and the original message_id.
- Voor retries: hergebruik dezelfde idempotency_key met hetzelfde contact en bericht. Een gewijzigd payload met dezelfde key retourneert HTTP 409.
NA
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.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
contact_id |
geheel getal | Vereist | Contact-ID geretourneerd door /telegram/contacts/. |
file |
file | Vereist | One JPG, PNG, WebP, PDF, TXT, CSV, JSON, ZIP or Office file, at most 5 MB. |
message |
tekenreeks | Facultatief | Optional caption of at most 1024 characters. |
idempotency_key |
UUID-string | Facultatief | Reuse the same key and identical file and caption when retrying. |
Voorbeeld aanvragen
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'
Voorbeeldantwoord
{"ok":true,"message_id":124,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- 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.
NA
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.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
contact_id |
geheel getal | Vereist | Contact-ID geretourneerd door /telegram/contacts/. |
filename |
tekenreeks | Vereist | Original file name, for example photo.png or invoice.pdf. |
file_base64 |
tekenreeks | Vereist | Raw Base64 file contents or a data URI; decoded file must be 5 MB or smaller. |
message |
tekenreeks | Facultatief | Optional caption of at most 1024 characters. |
idempotency_key |
UUID-string | Facultatief | Reuse the same key with identical file contents, filename and caption on retries. |
Voorbeeld aanvragen
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"}'
Voorbeeldantwoord
{"ok":true,"message_id":125,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- 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.
KRIJGEN
List sent Telegram messages
https://api.smsmobileapi.com/telegram/sent/Geeft recente in wachtrij staande, verzendende, verzonden en mislukte berichten terug, nieuwste eerst.
Poll dit eindpunt met message_id om een bericht dat door /telegram/send/ is teruggegeven te volgen.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
message_id |
geheel getal | Facultatief | Geef de specifieke bericht-ID terug van /telegram/send/. |
contact_id |
geheel getal | Facultatief | Beperk resultaten tot één contact-ID. |
status |
queued | sending | sent | error | unknown | Facultatief | Filter op verzendstatus. |
limit |
geheel getal | Facultatief | Paginagrootte van 1 tot 100; standaard 50. |
cursor |
geheel getal | Facultatief | Gebruik paging.next_cursor om oudere berichten op te halen. |
Voorbeeld aanvragen
curl -G 'https://api.smsmobileapi.com/telegram/sent/' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
--data-urlencode 'message_id=123'
Voorbeeldantwoord
{"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}}
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- 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 betekent dat Telegram het bericht heeft geaccepteerd van het verbonden account; levering aan de ontvanger en leesbevestigingen worden niet gerapporteerd.
- unknown betekent dat de uitkomst van het verzenden niet kon worden bevestigd. Verstuur in deze status niet blindelings een bericht opnieuw.
KRIJGEN
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.
Parameters
| Naam | Type | Vereist | Beschrijving |
|---|---|---|---|
message_id |
geheel getal | Vereist | Message ID returned by /telegram/send/. |
Voorbeeld aanvragen
curl -L 'https://api.smsmobileapi.com/telegram/media/?message_id=124' \
-H 'X-SMSMobileAPI-Key: YOUR_API_KEY' \
-o attachment
Voorbeeldantwoord
Binary image or document bytes (Content-Type matches the file)
Wil je dit verzoek doen?Sluit uw API-toets bovenaan de pagina aan om de interactieve tester te ontgrendelen.
Sleutel verbinden ↑- 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.
Problemen oplossen
Fouten en veilige herhalingen
Lees de HTTP status en het JSON foutveld voordat u het opnieuw probeert. Probeer geen validatie of authenticatiefouten opnieuw zonder eerst het verzoek te corrigeren.
| HTTP | Rubriek | Wat te doen? |
|---|---|---|
| 401 | api_key_required / invalid_api_key | Stuur een geldige X-SMSMobileAPI-Key-header. |
| 402 | subscription_expired | Renew the SMSMobileAPI subscription linked to the API key. Telegram API access resumes after renewal. |
| 403 | API_ENDPOINT_DISABLED | Schakel de Telegram API of deze specifieke endpoint in bij My API Key. |
| 404 | contact_not_found | Synchroniseer contacten en gebruik een ID uit uw eigen Telegram-verbinding. |
| 409 | telegram_not_connected / idempotency_conflict | Verbind Telegram of kies een nieuwe idempotency key voor gewijzigde inhoud. |
| 422 | invalid_message / invalid_pagination | Corrigeer het bericht, de contact-ID of de pagineringparameters. |
| 429 | queue_full / rate_limited | Wacht tot in wachtrij staande verzendingen of de limiet per minuut zijn gereset. |
| 503 | sending_unavailable / service_unavailable | De verzendworker of opslag is tijdelijk niet beschikbaar; probeer het later opnieuw. |
| 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. |
Hulp nodig?
Breng de context van het verzoek en niet uw geheimen.
Deel het eindpunt, tijdstempel, HTTP status en gesanitiseerde respons. Neem nooit API sleutels, tokens of privé-inhoud van berichten.
Officiële mobiele applicatie
De veilige brug tussen uw telefoon, dashboard en API.
SMS- en oproepoperaties gaan door via de officiële SMSMobileAPI-app die op uw aangesloten telefoon is geïnstalleerd. De app koppelt het apparaat veilig met uw account, synchroniseert geautoriseerde evenementen en koppelt het mobiele netwerk aan het dashboard en REST API.
- Ondertekende releases verspreid via de officiële Google Play en Apple App Store lijsten
- Google en Apple platform review, ondertekening en distributie controles
- Veilige apparaat koppeling, HTTPS transport en geauthentiseerde API toegang
- Alleen de rechten die nodig zijn voor de mobiele functies die u aanroept


