{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"de800425-e035-4d38-8cd3-777b7abe8a2b","name":"Tango Networks Messaging Gateway API","description":"The **Tango Messaging Gateway** allows the UC platform of a Tango Networks Extend partner to act as the PSTN messaging (next hop) peer for the sending and receiving of SMS and MMS messages to and from a Tango Networks Extend subscriber/SIM.\n\n- The **Messaging Gateway** provides a simple, synchronous HTTPs POST-based API for sending and receiving methods, and also media handling methods for MMS messages.\n    \n\n- The **Messaging Gateway** assumes that the partner has implemented appropriate interfaces to a PSTN carrier for the DIDs/numbers they intend to use with Tango Networks Extend SIMs and messaging.\n    \n    - Partners wishing to use the **Messaging Gateway** must therefore implement a two-sided process for messaging:\n        \n    - Partner to PSTN carrier interface (typically SMPP or HTTP) for subscriber DID’s\n        \n    - Partner to **Tango Messaging Gateway** interface for sending/receiving messages to/from these DID’s to/from SIM’s.\n        \n\n# 📱⇒☁️ SMS/MMS Origination Message Flow\n\nThe following picture shows how an SMS/MMS message origination flows from the Tango Extend subscriber, through the Tango Networks Extend Platform and the UC Partner's UCaaS Platform, to route over the PSTN to the destination party.\n\n<img src=\"https://content.pstmn.io/588b4d8b-7fce-4137-9ae8-c33246f21ccb/VE1HLW9yaWdpbmF0aW9uLnBuZw==\">\n\n# ☁️⇒📱 SMS/MMS Term Network Flow\n\nThe following picture shows how an SMS/MMS message termination flows from the PSTN, through the UC Partner's UCaaS Platform and the Tango Networks Extend Platform, to deliver to the Tango Extend's mobile device.\n\n<img src=\"https://content.pstmn.io/92cda6b2-aa4b-43c7-ad0b-d9133d9e7364/VE1HLXRlcm1pbmF0aW9uLnBuZw==\">\n\n# Tango Messaging Gateway - Configuration\n\nThe **Tango Messaging Gateway** is configured as part of the Tango Networks Extend platform. The Partner must implement an interface to the **Tango Provisioning API** and manually configure the gateway using the **Tango Networks Control Panel**.\n\nThe configuration items include the following items that must be configured per **Tango Messaging Gateway**.\n\n- **Primary URL** - _Required_ - The **Tango Messaging Gateway** uses this URL to send the HTTPS requests to the UCaaS Server. This URL is always the first option used to deliver an HTTPS Message.\n    \n- **Secondary URL** - _Optional_ - If the Primary Server returns an error. The **Tango Messaging Gateway** may try to deliver the message to the secondary server. See the section on Response Code Handling to understand when the secondary server is used.\n    \n- **Client Secret** - _Required_ - Any Request delivered to the **Tango Messaging Gateway** must contain an Bearer Authorization Header containing this token.\n    \n- **Security Token** - _Required_ - Any Request delivered to the UCaaS server must contain an Bearer Authorization Header containing this token.\n    \n\n# 📦 Store And Forward\n\nIn the case where a message fails to deliver to the UCaaS Server. The Tango Networks Extend platform will perform store and forward where the request is stored and delivered at a later time.\n\nThe Tango Networks Extend platform performs store and forward based on the error response received from the UCaaS server. Any response considered a temporary failure is processed by the store and forward service. Refer to the section on Error Responses for information on which responses are considered permanent or temporary.\n\nA message that has been stored is tried again roughly every 30 seconds and will persist for 7 days, after which the message is discarded. These durations are controlled by Tango Networks and cannot be changed by a customer.\n\nIn order to maintain message order. After a subscriber’s message has been placed into the Store and Forward service. All future messages for this subscriber are automatically placed in the store. The messages are then delivered based on the re-try timer (no less than 30 seconds) and delivered based on the order placed in the store service.\n\n# 👨‍👦‍👦 Group Messaging\n\nGroup Messaging (also called Group MMS) is just an MMS message that contains more than one recipient. Group Messaging is supported by the **Tango Messaging Gateway**. Each recipient's E.164 number is contained in the list of `TO` users. Group messages use the message type `mms` in.\n\n## Group Messaging Originations\n\nWhen a subscriber originates a group message, the **Tango Messaging Gateway** delivers a single message event, with `\"type\" = \"mms\"`, to the UCaaS Platform. The `To` field contains the E.164 number of each participant that needs to receive the message. The `From` and `Owner` fields contain the E.164 number of the subscriber that has originated this message.\n\n## Group Messaging Terminations\n\nWhen a 3rd party generates a group message, the UCaaS Server is expected to send a message to the **Tango Messaging Gateway** for each Tango Subscriber (SIM) that is part of the group. The `To` field contains the E.164 number of each participant that needs to receive the message. The `Owner` field contains the E.164 number of the subscriber that receives this message.\n\n# 😀 Emojis\n\nEmojis and extended characters are supported. These will be encoded as UTF-8. There may be limitations on how these are rendered based on the handset.\n\n# ⚙️ SMS Messages with binary UDH data\n\nUser data header (UDH) is a binary structure that may be present at the start of a short message in an SMS. It does not contain text but defines how to process the message. Generally, the UDH is either used in combination with binary content known as smart messaging for ringtones, operator logos, WAP Push and vCards, or it is used for concatenated SMS.\n\nBinary UDH messages are not supported using the **Tango Messaging Gateway** interface.\n\nThe Tango Networks Extend platform handles all SMS concatentation and fragmentation operations required for long message handling. As such, the UCaaS Server does not have to deal with handling message fragmentation/ordering/re-assembly operations for long SMS messages.\n\n## Message Concatentation during SMS Originations\n\nWhen a mobile sends a message that exceeds the limit of a single SMS message (160 characters for traditional text only characters, or 70 characters if extended characters, like emoji, are used), the message is received by the Tango Networks Extend platform as a series of message fragments, with binary UDH information included that allows the platform to process the fragments in the correct order. Once all the fragments are received, the Tango Networks Extend platform combines them into a single message event. This single message event is then POST-ed by the **Tango Messaging Gateway** interface to the UCaaS server. No fragment identifcation information is included the POST-ed origination message.\n\n## Message Fragmentation during SMS Terminations\n\nLike SMS originations, fragment identification information is not supported over the **Tango Messaging Gateway** interface during SMS terminations. A POST-ed message event from the UCaaS must contain the entire content for that message event. The **Tango Messaging Gateway** interface does not process fragment identification information, nor will it re-order fragments into sequential order during delivery, from the UCaaS server.\n\nThe Tango Networks Extend platform will automatically fragment a \"long\" message event and send all pieces to the mobile. The mobile device will re-assemble the pieces in the proper order and present the \"long\" message to mobile as a single SMS event.\n\n# Data-only Messaging Services\n\nSome mobile messaging applications do not rely on SMS or MMS to transmit their messaging data. These are sometimes called data-only messaging services. A few examples of these types of data-only messaging services are:\n\n- Apple's iMessage service\n    \n- Android's RCS service\n    \n- WhatsApp\n    \n- Facebook Messenger\n    \n\nThese types of client application messaging services are not seen by the Tango Networks Extend platform's messaging infrastructure, and as such, are not supported by the **Tango Messaging Gateway** interface.\n\n# 🔑 Security\n\nAll messages sent to/received by the **Tango Messaging Gateway** use HTTPS, which are transmitted using TLS encryption. HTTPS requires that the customer provide a proper valid public SSL certificate, issued by CA, to Tango Networks support so it can be loaded onto the Tango Networks Extend platform servers.\n\nThe UC Partner must provide Tango Networks support with a complete list of IP addresses that UCaaS platform will use to communicate with **Tango Messaging Gateway** interface. Tango Networks support will add those IP addresses to the appropriate firewall ACL rules to enable successful network connectivity between the **Tango Messaging Gateway** and the UCaaS platform servers.\n\n# 🔐 Authentication\n\nBearer authentication is an HTTP authentication scheme that involves security tokens called bearer tokens. These tokens are to be included in every request as part of the Authentication Header. These tokens are data filled against the provisioning **Tango Messaging Gateway**. There is one token to be used when messages are sent to the UCaaS server and a separate token used when sent to the **Tango Messaging Gateway**.\n\nAny message that is received for a subscriber that does not have a valid token receives a `401 Unauthorized` response.\n\n- Missing Authorization Header\n    \n- Received token Does not match the provisioned token\n    \n- Header is in the incorrect format.\n    \n\n# 📷 Media Messages\n\nMedia images (an MMS message) are encoded as base64 and contained in the JSON message body with the following limitations.\n\n- 1 MB Limit\n    \n- Images, videos, audio, docs, and vcard are all supported by the API.\n    \n    - **Supported MMS file types** are:\n        \n        - Application: json, ogg, pdf, rtf, zip, x-tar, xml, gzip, x-bzip2, x-gzip, smil\n            \n        - Text: plain, javascript, css, csv, cal, html, vcard, x-vcard, vnd.wap.wml, rtf, xml\n            \n        - Audio: mp4, mpeg, ogg, flac, wav, amr, 3gpp\n            \n        - Image: bmp, gif, jpeg, png, svg+xml, tiff, webp, x-icon\n            \n        - Video: mp4, mpeg, ogg, quicktime, webm, x-ms-wmv, x-flv\n            \n            **NOTE**: There may be limitations on how individual file types are rendered based on the handset.\n            \n\n# 🚦 Transmission Rates\n\nThe API is restricted to 1 message per second.\n\n# ⛔️ Restrictions and Limitations\n\n- Tango Networks Extend platform system messages and other binary SMS messages are not supported over the **Tango Messaging Gateway** interface. This includes the following types of messages:\n    \n    - Message Waiting Indication (MWI) messages,\n        \n    - Over-the-air SIM configuration messages\n        \n    - iMessage/FaceTime/iCloud activation messaging\n        \n    - other binary UDH messaging\n        \n- API is restricted to 1 message per second.\n    \n- DLR reports are not provided.\n    \n- 1MB limit for base64 encoding data.\n    \n- There may be limitations as to how Emojis and media attachments (images, pdf, etc.) are rendered on any particular handset.\n    \n- For Message Originations:\n    \n    - All numbers in the `From`, and `Owner` must be in the e.164 format.\n        \n    - The `To` field can be:\n        \n        - e.164 format\n            \n        - SMS shortcode (5 or 6 digits)\n            \n- For Message Terminations:\n    \n    - All numbers in the `To` and `Owner` must be in the e.164 formart\n        \n    - The `From` field can be:\n        \n        - e.164 format\n            \n        - up to 11 alphanumeric characters (including the space character) and must start with an alpha character\n            \n        - SMS shortcode (5 or 6 digits)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5460831","team":257046,"collectionId":"de800425-e035-4d38-8cd3-777b7abe8a2b","publishedId":"2s93RXrVQ8","public":true,"publicUrl":"https://api-messaging.tango-networks.com","privateUrl":"https://go.postman.co/documentation/5460831-de800425-e035-4d38-8cd3-777b7abe8a2b","customColor":{"top-bar":"172A80","right-sidebar":"303030","highlight":"172A80"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"172A80","right-sidebar":"303030","highlight":"172A80"}}]}},"version":"8.10.1","publishDate":"2024-04-17T18:46:55.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/77341fa5d53538b935e87a0c70315a3e20cc757e5e6fa3b601d214f31464a0a9","favicon":"https://res.cloudinary.com/postman/image/upload/v1681152620/team/q3nv7qzb8nqzkvjxupce.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://api-messaging.tango-networks.com/view/metadata/2s93RXrVQ8"}