ابدأ هنا
طلبك الأول في أربع خطوات
Keep your main SMSMobileAPI subscription active; Telegram connection, API access, sending and sent-message history pause when it expires.
اربط حساب Telegram الخاص بك عبر QR code في لوحة التحكم ومزامنة جهات الاتصال الخاصة به.
انسخ مفتاح SMSMobileAPI الخاص بك من My API Key واحتفظ به على خادمك.
اعرض قائمة جهات الاتصال وانسخ 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.
حساب 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'
مثال على الإجابة
{"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"}'
مثال على الإجابة
{"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'
مثال على الإجابة
{"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"}'
مثال على الإجابة
{"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'
مثال على الإجابة
{"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
مثال على الإجابة
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 | المدونة | ماذا تفعل؟ |
|---|---|---|
| 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 | فعّل Telegram API أو هذا المُنتهى المحدد في My API Key. |
| 404 | contact_not_found | زامن جهات الاتصال واستخدم معرفاً من اتصال Telegram الخاص بك. |
| 409 | telegram_not_connected / idempotency_conflict | اتصل بـ Telegram أو اختر مفتاح لا تُكرار جديد للمحتوى المُغيّر. |
| 422 | invalid_message / invalid_pagination | صحّح الرسالة أو معرّف جهة الاتصال أو معطيات التجزئة (paging). |
| 429 | queue_full / rate_limited | انتظر حتى يتم تفريغ الرسائل في الطابور أو حدود الإرسال في الدقيقة. |
| 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. |
هل تحتاج إلى مساعدة؟
أحضري سياق الطلب ليس أسرارك
Share the endpoint, timestamp, HTTP status and sanitized response. لا تشمل أبداً مفاتيح API، أو مداخل أو محتوى الرسائل الخاصة.
تطبيق الهاتف المحمول الرسمي
الجسر الآمن بين هاتفك ولوحة المعلومات وواجهة برمجة التطبيقات.
تمر عمليات الرسائل القصيرة والمكالمات عبر تطبيق SMSMobileAPI الرسمي المثبت على هاتفك المتصل. يقوم التطبيق بإقران الجهاز بحسابك بشكل آمن، ومزامنة الأحداث المصرح بها، وربط شبكة الجوال بلوحة التحكم وواجهة برمجة التطبيقات REST.
- الإصدارات الموقعة الموزعة من خلال قوائم Google Play وApple App Store الرسمية
- عناصر التحكم في المراجعة والتوقيع والتوزيع لنظامي Google وApple الأساسيين
- إقران آمن للجهاز، ونقل HTTPS، والوصول إلى واجهة برمجة التطبيقات المصادق عليها
- فقط الأذونات المطلوبة لميزات الهاتف المحمول التي تقوم بتمكينها


