{"_id":"56ab8a0f678b58170031ebab","version":{"_id":"568fce2b04440a1700e4cb4a","project":"568fce2a04440a1700e4cb47","__v":20,"createdAt":"2016-01-08T14:56:43.101Z","releaseDate":"2016-01-08T14:56:43.101Z","categories":["568fce2b04440a1700e4cb4b","568fd1b8b700ce0d002f4b1c","568fd23804440a1700e4cb5b","568fd2444719c119002ce5d8","568ff21204440a1700e4cbc1","5693732c8aa8040d009f2c28","5693738393445b0d00abdad0","5693740093445b0d00abdad1","56937445974aaa0d001ca699","5693b82173f48f0d0075c90d","5694c4cd1005590d0062cb25","569f854466a5640d00efa54c","56a264cdd15dd70d008d825b","56aa56bf318e6c1700a19ddb","56b0e6347ae4550d000627bd","56b200c0f48f270d00e0de6f","56b200c6f48f270d00e0de70","56b22a9665ddf50d0076ba40","56e92ef71996862200fd7f42","574d6577fb835c0e00ca316a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"55116f88e2990b0d00fb0552","__v":14,"parentDoc":null,"category":{"_id":"5693b82173f48f0d0075c90d","version":"568fce2b04440a1700e4cb4a","pages":["56ab8a0f678b58170031ebab","56ab93620b9e0b0d00616245","56af63088be2ea0d00b4886e","56d02fc81991690b003b2a8e"],"project":"568fce2a04440a1700e4cb47","__v":4,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-11T14:11:45.170Z","from_sync":false,"order":8,"slug":"inbound-message-forwarding","title":"Forwarding"},"project":"568fce2a04440a1700e4cb47","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-29T15:49:35.961Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"If you need to receive inbound messages sent from phone handsets to a Dynmark long number or shortcode keyword, you can request that these are forwarded to a URL of your choosing which is compatible with the Inbound Handler specification detailed below. Simply log in to the Dynmark User Portal and visit the [Inbound Settings](https://apps.dynmark.com/DD/UserPortal/Home/IncomingForwarding) page to enter the URL you want to use. Each long number and keyword can have a different URL if required.\n\nOnce configured the system will send you your inbound messages to the configured URL in real time. \n\n##Security\n###Encryption\nAlthough you can specify an HTTP URL, we recommend that you specify HTTPS to ensure data security. We use only TLS 2048 bit encryption. We do not support SSL 2.0 or 3.0. Note that we cannot accommodate self signed certificates.\n###Authentication\nYour reception page to receive the forwarded SMS data from Dynmark will need to be able to recognise when the data is being posted from Dynmark as opposed other systems for security reasons. To achieve this we recommend a secret is added to the forwarding URL using a query string that will be checked to ensure it matches prior to accepting posted data. E.g.\nIf our forwarding URL is: **https://integration.acme.com/inbound**\nAdd a query string secret to it: **https://integration.acme.com/inbound?secret=YouW1llN3v3rGue55This!** \n\nThe URL + secret query string needs to be be configured as the forwarding URL for your long number or shortcode in the Dynmark portals inbound settings screen.\n\nThis authentication system is following the trusted subsystem pattern.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Inbound Handler\"\n}\n[/block]\nThe Inbound Handler is a simple web page you will create that complies with the specification defined below that allows the Dynmark system to forward the received SMS to your systems.\n\nThe URL for your inbound handler must be publicly accessible and be capable of processing the received message within 10 seconds. Once you have received the data you should return an HTTP 200 OK response to indicate this. If we don’t receive a 200 OK response within 10 seconds the submission will be considered failed and will be retried later. See [Forwarding Retries](doc:forwarding-retries)  for more details.\n\n## Query String Data\nThe system passes the inbound data using query strings. An example of the full URL a handler would expect to receive is:\n\n**http:<span></span>//forwarding.example.com/InboundHandler?sender=447787654321&recipient=447700000001&content=Example+Message&datetime=01+Jan+2010+13%3a25%3a34&clientref=001&msgid=111111111&dmpuser=username&keyword=Example**\n\nThe Query String parameters and their values are:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Value\",\n    \"0-0\": \"<code>sender</code>\",\n    \"0-1\": \"The address the message was sent from. This is usually a phone number but can be an alphanumeric string where messages are from automated systems, e.g. voicemail message notifications\",\n    \"1-0\": \"<code>recipient</code>\",\n    \"1-1\": \"The number the message was sent to\",\n    \"2-0\": \"<code>content</code>\",\n    \"2-1\": \"The message content\",\n    \"3-0\": \"<code>datetime</code>\",\n    \"3-1\": \"The time the message was received on the Dynmark Platform in the format 'dd MMM yyyy hh:mm:ss' e.g. '01 Jan 2016 09:05:10'\",\n    \"4-0\": \"<code>clientref</code>\",\n    \"4-1\": \"The clientref value is a value that can be populated by the user when a message is sent through the Dynmark Web Services. The value that was specified in the sent message will be returned on the inbound message if we can match the inbound to a submission\",\n    \"5-0\": \"<code>msgid</code>\",\n    \"5-1\": \"The message ID is the unique ID for a particular inbound message\",\n    \"6-0\": \"<code>keyword</code>\",\n    \"6-1\": \"The keyword value of the sender/keyword combination. This only applies if a valid shortcode/keyword combination has been attached to the Dynmark account. \\nIf no specific keyword is matched on a dedicated shortcode then ***** will be sent.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]","excerpt":"","slug":"inbound-message-forwarding","type":"basic","title":"Inbound Message Forwarding"}

Inbound Message Forwarding


If you need to receive inbound messages sent from phone handsets to a Dynmark long number or shortcode keyword, you can request that these are forwarded to a URL of your choosing which is compatible with the Inbound Handler specification detailed below. Simply log in to the Dynmark User Portal and visit the [Inbound Settings](https://apps.dynmark.com/DD/UserPortal/Home/IncomingForwarding) page to enter the URL you want to use. Each long number and keyword can have a different URL if required. Once configured the system will send you your inbound messages to the configured URL in real time. ##Security ###Encryption Although you can specify an HTTP URL, we recommend that you specify HTTPS to ensure data security. We use only TLS 2048 bit encryption. We do not support SSL 2.0 or 3.0. Note that we cannot accommodate self signed certificates. ###Authentication Your reception page to receive the forwarded SMS data from Dynmark will need to be able to recognise when the data is being posted from Dynmark as opposed other systems for security reasons. To achieve this we recommend a secret is added to the forwarding URL using a query string that will be checked to ensure it matches prior to accepting posted data. E.g. If our forwarding URL is: **https://integration.acme.com/inbound** Add a query string secret to it: **https://integration.acme.com/inbound?secret=YouW1llN3v3rGue55This!** The URL + secret query string needs to be be configured as the forwarding URL for your long number or shortcode in the Dynmark portals inbound settings screen. This authentication system is following the trusted subsystem pattern. [block:api-header] { "type": "basic", "title": "Inbound Handler" } [/block] The Inbound Handler is a simple web page you will create that complies with the specification defined below that allows the Dynmark system to forward the received SMS to your systems. The URL for your inbound handler must be publicly accessible and be capable of processing the received message within 10 seconds. Once you have received the data you should return an HTTP 200 OK response to indicate this. If we don’t receive a 200 OK response within 10 seconds the submission will be considered failed and will be retried later. See [Forwarding Retries](doc:forwarding-retries) for more details. ## Query String Data The system passes the inbound data using query strings. An example of the full URL a handler would expect to receive is: **http:<span></span>//forwarding.example.com/InboundHandler?sender=447787654321&recipient=447700000001&content=Example+Message&datetime=01+Jan+2010+13%3a25%3a34&clientref=001&msgid=111111111&dmpuser=username&keyword=Example** The Query String parameters and their values are: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Value", "0-0": "<code>sender</code>", "0-1": "The address the message was sent from. This is usually a phone number but can be an alphanumeric string where messages are from automated systems, e.g. voicemail message notifications", "1-0": "<code>recipient</code>", "1-1": "The number the message was sent to", "2-0": "<code>content</code>", "2-1": "The message content", "3-0": "<code>datetime</code>", "3-1": "The time the message was received on the Dynmark Platform in the format 'dd MMM yyyy hh:mm:ss' e.g. '01 Jan 2016 09:05:10'", "4-0": "<code>clientref</code>", "4-1": "The clientref value is a value that can be populated by the user when a message is sent through the Dynmark Web Services. The value that was specified in the sent message will be returned on the inbound message if we can match the inbound to a submission", "5-0": "<code>msgid</code>", "5-1": "The message ID is the unique ID for a particular inbound message", "6-0": "<code>keyword</code>", "6-1": "The keyword value of the sender/keyword combination. This only applies if a valid shortcode/keyword combination has been attached to the Dynmark account. \nIf no specific keyword is matched on a dedicated shortcode then ***** will be sent." }, "cols": 2, "rows": 7 } [/block]