メインコンテンツまでスキップ

Webhooks

このメソッドは、様々な会話イベントを受信するためのウェブフックの設定と構成に関するものです。これらのイベントには、ユーザーからの新しいメッセージや、送信メッセージのステータスに関する更新が含まれます。

Webhookトリガーが発生すると、設定されたWebhook URLにJSONペイロードを含むPOSTリクエストが送信されます。

アプリケーションが正常に機能するよう、Webhookに対して200レスポンスを返すようにしてください

このテーブルは、イベントメッセージのタイプとして考えられるすべてのオプションを一覧表示しています。

TypeDescription
MESSAGE_CREATEDNew message received by our platform
MESSAGE_DELIVERYDelivery status updates of one message
USER_EVENTUser related events like subscription
TEMPLATE_STATUS_UPDATETemplate status updates
TEMPLATE_CATEGORY_UPDATETemplate category updates

メッセージ配信状況

Conversations API プラットフォームは、以前に送信されたメッセージのステータス更新を提供するために、MESSAGE_DELIVERY タイプのイベント通知を生成します。

メッセージ配信ステータスコードは以下に詳細が記載されています('status'パラメータ)。

CodeDescription
DELIVEREDthe message was delivered to the user
READ.the message was read by the user
SENTthe message was sent to the provider
REJECTEDthe message was rejected by our platform
FAILEDthe message failed to be sent
EXPIREDthe message was not delivered in time
UNKNOWNthe 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.

CodeDescription
1Unknown
2User Not Subscribed
3Price or Cost config Not Found
4An error with your media. Could be an unsupported file format, etc
5Free Test Quota Exceeded For Messages
6Channel server unreachable
7Monthly minimum fee not found
8Template error
9Quick Reply invalid item count, should be between 2 and 5
10Channel integration configuration not found
11Overloaded
12Your balance is not sufficient for this transaction
13Route configuration not found
14The business is not eligible or the template ID is not allowed for the business
15Not found registered device for the phone number or message undeliverable due user preferences / legal reason
16carrier network retry exceed
17API Request rejected
100User Not Found
300Country not allowed
301SMS request not success
302App Route configuration not found
303Channel is not activated

ユーザーイベント

エンドユーザーがサブスクリプション設定を変更するたびに、プラットフォームはUSER_EVENTタイプのイベントを送信します。

このテーブルは、イベントメッセージのタイプとして考えられるすべてのオプションを一覧表示しています。

TypeDescription
SUBSCRIBEDThe user has subscribed
UNSUBSCRIBEDThe user has unsubscribed
TAG_ASSIGNUser tag assignment has been updated

エラー

Webhook リクエストが失敗した場合、システムは15分間の時間枠内で最大3回の追加再試行を行います。

ターゲットが成功コード(2XX)または解決不可能なエラーで応答しない場合、リトライの間隔は指数関数的に増加します。

さらに、20秒以内に応答がない場合、システムはそれを失敗とみなし、再試行を開始します。