تُرسل رسائل SMS من هاتفك المحمول الخاص.اكتشف كيف يعمل
المنصةAPI-first structureأجهزة آمنةإبراز التنفيذمراقبة الترايينات المتعددةالوثائق المغلقة
مركز المطورين/واجهة Telegram البرمجية

TG · 6 عمليات موثّقة

توثيق Telegram API

استخدم حساب Telegram المتصل من تطبيقك الخاص: اعثر على جهات الاتصال، وضع رسالة في الطابور وتابع حالة إرسالها.

جهات اتصال ورسائل Telegram مرتبطة بتطبيق تجاري
قاعدة RESThttps://api.smsmobileapi.com

JSON responses ; HTTPS required − UTF-8

إربط مفتاحك

اتصل مرة واحدة، ثم اختبر نقاط النهاية عبر SMS والمكالمات والإشعارات وWhatsApp وTelegram والبريد الإلكتروني.

ابدأ هنا

طلبك الأول في أربع خطوات

1

Keep your main SMSMobileAPI subscription active; Telegram connection, API access, sending and sent-message history pause when it expires.

2

اربط حساب Telegram الخاص بك عبر QR code في لوحة التحكم ومزامنة جهات الاتصال الخاصة به.

3

انسخ مفتاح SMSMobileAPI الخاص بك من My API Key واحتفظ به على خادمك.

4

اعرض قائمة جهات الاتصال وانسخ contact_id للمستلم المقصود.

5

Send JSON for text, or multipart/form-data to attach an image or document. Use the returned message_id to check the sent log.

حساب TELEGRAM الخاص بك

اتصل، اختر جهة اتصال، ثم تابع الإرسال.

الحساب الموسَّع

يقوم كل عميل بمسح QR code لربط حساب Telegram الخاص به. قم بمزامنة جهات الاتصال في لوحة التحكم، استخدم معرّف الجهة المرجعي لجدولة رسالة، ثم تفحص حالتها في سجل المرسَل.

1

يتصل

امسح QR code في صفحة لوحة معلومات Telegram.

2

ابحث عن جهة اتصال

زامن، ثم ابحث عن معرف جهة الاتصال عبر API.

3

يرسل

أرسل (POST) رسالة JSON واحدة مع مفتاح idempotency.

4

مسار

اقرأ حالات queued أو sent أو unknown أو error.

المصادقة

حافظ على أوراق اعتمادك على خادمك

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 قبلت أو سلمت الرسالة. استعلم عن سجل المرسَل لمتابعة حالة الإرسال أو الأخطاء.
  • الخدمة ترسل حالياً إلى جهة اتصال مزامنة واحدة أو @username محفوظ واحد لكل طلب. احترم قواعد Telegram وموافقة المستلم.
  • الطلبات مقيدة بـ 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'

مثال على الإجابة

JSON
{"ok":true,"data":[{"contact_id":42,"display_name":"Alex Example","username":"alex_example","source":"telegram"}],"paging":{"has_more":false,"next_cursor":null}}

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • معرّفات جهات الاتصال تخص الحساب المتصل؛ لا يمكن استخدام معرّف من حساب آخر.
  • حدّث جهات الاتصال من لوحة التحكم → جهات اتصال Telegram عندما لا تظهر جهة جديدة.
بريد

أرسل رسالة Telegram

#
نهاية الفقرةhttps://api.smsmobileapi.com/telegram/send/

يضع في الطابور رسالة نصية واحدة لجهة اتصال من حساب Telegram المتصل بك.

متى تستخدمه

استخدم contact_id من نقطة جهات الاتصال. احفظ message_id للتتبع.

حدود

الاسميكتبالاحتياجاتوصف
contact_id ثلاجة مطلوب معرّف جهة الاتصال الذي أعاده /telegram/contacts/.
message خيط مطلوب نص UTF-8، من 1 إلى 4096 حرفاً وبحد أقصى 16000 بايت.
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"}'

مثال على الإجابة

JSON
{"ok":true,"message_id":123,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • 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/.
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'

مثال على الإجابة

JSON
{"ok":true,"message_id":124,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • 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/.
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"}'

مثال على الإجابة

JSON
{"ok":true,"message_id":125,"status":"queued","idempotency_key":"2d40bb10-cc42-4c30-a282-93fc6dd8e161","duplicate":false}

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • 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/.
contact_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'

مثال على الإجابة

JSON
{"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}}

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • 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

مثال على الإجابة

JSON
Binary image or document bytes (Content-Type matches the file)

هل تريد أن تدير هذا الطلب؟اتصل بمفتاحك في أعلى الصفحة لفتح المُختبر التفاعلي

مفتاح الوصل
من الجيد معرفة
  • 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المدونةماذا تفعل؟
401api_key_required / invalid_api_keyأرسل ترويسة صالحة X-SMSMobileAPI-Key.
402subscription_expiredRenew the SMSMobileAPI subscription linked to the API key. Telegram API access resumes after renewal.
403API_ENDPOINT_DISABLEDفعّل Telegram API أو هذا المُنتهى المحدد في My API Key.
404contact_not_foundزامن جهات الاتصال واستخدم معرفاً من اتصال Telegram الخاص بك.
409telegram_not_connected / idempotency_conflictاتصل بـ Telegram أو اختر مفتاح لا تُكرار جديد للمحتوى المُغيّر.
422invalid_message / invalid_paginationصحّح الرسالة أو معرّف جهة الاتصال أو معطيات التجزئة (paging).
429queue_full / rate_limitedانتظر حتى يتم تفريغ الرسائل في الطابور أو حدود الإرسال في الدقيقة.
503sending_unavailable / service_unavailableعامل الإرسال أو التخزين غير متاح مؤقتاً؛ أعد المحاولة لاحقاً.
503media_not_readyFile sending requires the current Telegram service update. Text sending remains available.
404 / 410media_not_found / media_expiredThe file is unavailable or past its 90-day retention period.
قاعدة إعادة التأهيلRetry only transient 429 and 5x responses. ابدأ بعد ثانية واحدة ثم تراجع إلى 2 و 4 و 8 ثواني

هل تحتاج إلى مساعدة؟

أحضري سياق الطلب ليس أسرارك

Share the endpoint, timestamp, HTTP status and sanitized response. لا تشمل أبداً مفاتيح API، أو مداخل أو محتوى الرسائل الخاصة.

الاتصال بشركة API
تطبيق الجوال SMSMobileAPI الآمن الذي يربط الهاتف بلوحة تحكم الويب وREST API لعمليات الرسائل القصيرة والمكالمات
اتصال مشفر من الهاتف المحمول إلى النظام الأساسي

تطبيق الهاتف المحمول الرسمي

الجسر الآمن بين هاتفك ولوحة المعلومات وواجهة برمجة التطبيقات.

تمر عمليات الرسائل القصيرة والمكالمات عبر تطبيق SMSMobileAPI الرسمي المثبت على هاتفك المتصل. يقوم التطبيق بإقران الجهاز بحسابك بشكل آمن، ومزامنة الأحداث المصرح بها، وربط شبكة الجوال بلوحة التحكم وواجهة برمجة التطبيقات REST.

1تطبيق الجوالإقران الهاتف وشريحة SIM الخاصة به 2رابط مشفريصادق البيانات ويحميها في العبور 3لوحة التحكم وواجهة برمجة التطبيقاتتتحكم في سير العمل والنشاط
  • الإصدارات الموقعة الموزعة من خلال قوائم Google Play وApple App Store الرسمية
  • عناصر التحكم في المراجعة والتوقيع والتوزيع لنظامي Google وApple الأساسيين
  • إقران آمن للجهاز، ونقل HTTPS، والوصول إلى واجهة برمجة التطبيقات المصادق عليها
  • فقط الأذونات المطلوبة لميزات الهاتف المحمول التي تقوم بتمكينها
احصل على تطبيق SMSMobileAPI الرسمي على Google Play تحميل التطبيق الرسمي للزجاجة SMSMobileAPI على جهاز التفريغ App Store
تعتمد الإمكانيات على الأذونات والوصول إلى الخلفية التي يسمح بها Android أو iOS.