|
1 | 1 | Turn Channels API (EXPERIMENTAL: DO NOT USE IN PRODUCTION) |
2 | | -------------------- |
| 2 | +---------------------------------------------------------- |
3 | 3 |
|
4 | 4 | This application provides bidirectional messaging over HTTP, intended |
5 | 5 | for integration with `Turn's Channels API <https://whatsapp.turn.io/docs/api/channel_api>`_. |
6 | 6 |
|
7 | 7 | Currently this only supports text message types. A future iteration will support other types. |
8 | 8 |
|
| 9 | +.. py:currentmodule:: vumi2.applications.turn_channels_api |
| 10 | +
|
9 | 11 | Configuration |
10 | 12 | ^^^^^^^^^^^^^ |
11 | 13 |
|
@@ -143,17 +145,17 @@ Inbound messages that are ``POST``\ed to :py:data:`turn_api_url`/messages have t |
143 | 145 | .. http:post:: /<turn_api_url>/messages |
144 | 146 |
|
145 | 147 | :<json dict contact: Information about the contact who sent the message. |
146 | | - :<json str contact.id: The Turn contact ID, which is an MSISDN. |
147 | | - :<json dict contact.profile: The contact's profile information. |
148 | | - :<json str contact.profile.name: The contact's name. |
| 148 | + :<json str contact.id: The Turn contact ID, which is an MSISDN. |
| 149 | + :<json dict contact.profile: The contact's profile information. |
| 150 | + :<json str contact.profile.name: The contact's name. |
149 | 151 |
|
150 | 152 | :<json dict message: The message received from the user. |
151 | | - :<json str message.type: The type of message. Currently only ``text`` is supported. |
152 | | - :<json dict message.text: Required when message type is ``text``. |
153 | | - :<json str message.text.body: The text content of the message. |
154 | | - :<json str message.from: The user ID as an MSISDN. A Channel can respond to a user using this ID. |
155 | | - :<json str message.id: The ID for the message that was received by the Channel. |
156 | | - :<json int message.timestamp: Unix timestamp indicating when the message was received from the user. |
| 153 | + :<json str message.type: The type of message. Currently only ``text`` is supported. |
| 154 | + :<json dict message.text: Required when message type is ``text``. |
| 155 | + :<json str message.text.body: The text content of the message. |
| 156 | + :<json str message.from: The user ID as an MSISDN. A Channel can respond to a user using this ID. |
| 157 | + :<json str message.id: The ID for the message that was received by the Channel. |
| 158 | + :<json int message.timestamp: Unix timestamp indicating when the message was received from the user. |
157 | 159 |
|
158 | 160 | **Example response**: |
159 | 161 |
|
@@ -224,4 +226,4 @@ A in-memory cache that stores the last inbound message for each user. This is us |
224 | 226 | In memory state cache |
225 | 227 | """"""""""""""""""""" |
226 | 228 |
|
227 | | -See `Message Caches <../message_caches.rst>`_ for more information. |
| 229 | +See `Message Caches <../message_caches.rst>`_ for more information. |
0 commit comments