Webhooks
このメソッドは、様々な会話イベントを受信するためのウェブフックの設定と構成に関するものです。これらのイベントには、ユーザーからの新しいメッセージや、送信メッセージのステータスに関する更新が含まれます。
Webhookトリガーが発生すると、設定されたWebhook URLにJSONペイロードを含むPOSTリクエストが送信されます。
アプリケーションが正常に機能するよう、Webhookに対して200レスポンスを返すようにしてください
このテーブルは、イベントメッセージのタイプとして考えられるすべてのオプションを一覧表示しています。
| Type | Description |
|---|---|
MESSAGE_CREATED | New message received by our platform |
MESSAGE_DELIVERY | Delivery status updates of one message |
USER_EVENT | User related events like subscription |
TEMPLATE_STATUS_UPDATE | Template status updates |
TEMPLATE_CATEGORY_UPDATE | Template category updates |
メッセージ配信状況
Conversations API プラットフォームは、以前に送信されたメッセージのステータス更新を提供するために、MESSAGE_DELIVERY タイプのイベント通知を生成します。
メッセージ配信ステータスコードは以下に詳細が記載されています('status'パラメータ)。
| Code | Description |
|---|---|
| DELIVERED | the message was delivered to the user |
| READ. | the message was read by the user |
| SENT | the message was sent to the provider |
| REJECTED | the message was rejected by our platform |
| FAILED | the message failed to be sent |
| EXPIRED | the message was not delivered in time |
| UNKNOWN | the message status is unknown |
In case of unsuccessful message deliveries, the platform will provide specific error codes ('errorCode' parameter) to indicate the cause of the failure.
| Code | Description |
|---|---|
| 1 | Unknown |
| 2 | User Not Subscribed |
| 3 | Price or Cost config Not Found |
| 4 | An error with your media. Could be an unsupported file format, etc |
| 5 | Free Test Quota Exceeded For Messages |
| 6 | Channel server unreachable |
| 7 | Monthly minimum fee not found |
| 8 | Template error |
| 9 | Quick Reply invalid item count, should be between 2 and 5 |
| 10 | Channel integration configuration not found |
| 11 | Overloaded |
| 12 | Your balance is not sufficient for this transaction |
| 13 | Route configuration not found |
| 14 | The business is not eligible or the template ID is not allowed for the business |
| 15 | Not found registered device for the phone number or message undeliverable due user preferences / legal reason |
| 16 | carrier network retry exceed |
| 17 | API Request rejected |
| 100 | User Not Found |
| 300 | Country not allowed |
| 301 | SMS request not success |
| 302 | App Route configuration not found |
| 303 | Channel is not activated |
ユーザーイベント
エンドユーザーがサブスクリプション設定を変更するたびに、プラットフォームはUSER_EVENTタイプのイベントを送信します。
このテーブルは、イベントメッセージのタイプとして考えられるすべてのオプションを一覧表示しています。
| Type | Description |
|---|---|
SUBSCRIBED | The user has subscribed |
UNSUBSCRIBED | The user has unsubscribed |
TAG_ASSIGN | User tag assignment has been updated |
エラー
Webhook リクエストが失敗した場合、システムは15分間の時間枠内で最大3回の追加再試行を行います。
ターゲットが成功コード(2XX)または解決不可能なエラーで応答しない場合、リトライの間隔は指数関数的に増加します。
さらに、20秒以内に応答がない場合、システムはそれを失敗とみなし、再試行を開始します。
📄️ ウェブフックを作成
ウェブフックを作成または更新する
📄️ ウェブフックを一覧表示
ウェブフックを一覧表示