SMSHook
SMSステータスコールバック
URL
ユーザーがウェブページでカスタム入力
ユーザーがウェブページでカスタム入力
このコードブロックはフローティングウィンドウ内に表示されます
Content-Type:
application/json; charset=utf-8
application/json; charset=utf-8
このコードブロックはフローティングウィンドウ内に表示されます
HTTPリクエストメソッド
post
post
このコードブロックはフローティングウィンドウ内に表示されます
リクエストヘッダー
| ヘッダー | タイプ | 説明 |
|---|---|---|
| X-SMSHook-Signature | string | 署名 |
| X-SMSHook-Timestamp | long | メッセージタイムスタンプ |
| X-SMSHook-AppKey | string | アプリケーション |
| X-SMSHook-Version | string | バージョン |
リクエストボディ
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_id | string | メッセージID |
| from | string | 送信者(template_approvalメッセージの場合は空) |
| to | string | 受信者の電話番号(target、sent、およびtemplate_approvalメッセージの場合は空) |
| server | string | sms |
| itime | long | メッセージ生成タイムスタンプ |
| custom_args | json | 顧客が定義したカスタムフィールド |
| status | json | メッセージステータスコールバック |
SMSターゲットステータスメッセージ
status
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_status | string | target |
| status_data | json object | ステータスデータ |
| message | string | リクエスト成功 |
| template_id | int | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| label_id | int | ラベルID |
| user_id | int | ユーザーID |
| sms_user | string | SMSユーザー |
| sms_ids | array | 受信者のSMS ID配列 |
| to | array | 受信者の配列 |
| msg_type | int | メッセージタイプ |
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa",
"itime": 1679392394061,
"status": {
"message_status": "target",
"status_data": {
"user_id": 15,
"to": [
"+8618871186627",
"008615727024341"
],
"msg_type": 2,
"template_id": 881599,
"message": "successfully request",
"sms_user": "xiaojinmintest",
"sms_ids": [
"1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"1679392394031_15_17153_881599_c1fjwa$008615727024341"
],
"template_type": 2,
"label_id": 0
}
}
}
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa",
"itime": 1679392394061,
"status": {
"message_status": "target",
"status_data": {
"user_id": 15,
"to": [
"+8618871186627",
"008615727024341"
],
"msg_type": 2,
"template_id": 881599,
"message": "successfully request",
"sms_user": "xiaojinmintest",
"sms_ids": [
"1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"1679392394031_15_17153_881599_c1fjwa$008615727024341"
],
"template_type": 2,
"label_id": 0
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます
SMS送信済みステータスメッセージ
status
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_status | string | sent |
| status_data | json object | ステータスデータ |
| message | string | 送信成功 |
| template_id | int | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| label_id | int | ラベルID |
| user_id | int | ユーザーID |
| sms_user | string | SMSユーザー |
| sms_ids | array | 受信者のSMS ID配列 |
| to | array | 受信者の配列 |
| msg_type | int | メッセージタイプ |
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa",
"itime": 1679392394061,
"status": {
"message_status": "sent",
"status_data": {
"user_id": 15,
"to": [
"+8618871186627",
"008615727024341"
],
"msg_type": 2,
"template_id": 881599,
"message": "successfully sent",
"sms_user": "xiaojinmintest",
"sms_ids": [
"1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"1679392394031_15_17153_881599_c1fjwa$008615727024341"
],
"template_type": 2,
"label_id": 0
}
}
}
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa",
"itime": 1679392394061,
"status": {
"message_status": "sent",
"status_data": {
"user_id": 15,
"to": [
"+8618871186627",
"008615727024341"
],
"msg_type": 2,
"template_id": 881599,
"message": "successfully sent",
"sms_user": "xiaojinmintest",
"sms_ids": [
"1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"1679392394031_15_17153_881599_c1fjwa$008615727024341"
],
"template_type": 2,
"label_id": 0
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます
SMS配信済みステータスメッセージ
status
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_status | string | delivered |
| status_data | json object | ステータスデータ |
| message | string | 配信成功 |
| template_id | int | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| label_id | int | ラベルID |
| user_id | int | ユーザーID |
| sms_user | string | SMSユーザー |
| sms_id | string | SMS ID |
| msg_count | int | SMSの数 |
| msg_type | int | メッセージタイプ |
| outbound_time | string | リクエストチャネル時間 |
| receipt_time | string | 受信時間 |
{
"server": "sms",
"message_id": "1679387065399_15_17155_881597_0poco8$+115927992951",
"to": "+115927992951",
"itime": 1679388949000,
"status": {
"message_status": "delivered",
"status_data": {
"outbound_time": "2023-03-21 16:55:25",
"receipt_time": "2023-03-21 16:55:49",
"sms_id": "1679387065399_15_17155_881597_0poco8$+115927992951",
"user_id": 15,
"msg_type": 2,
"template_id": 881597,
"message": "successfully delivered",
"sms_user": "huangli_SMS",
"template_type": 1,
"msg_count": 1,
"label_id": 0
}
}
}
{
"server": "sms",
"message_id": "1679387065399_15_17155_881597_0poco8$+115927992951",
"to": "+115927992951",
"itime": 1679388949000,
"status": {
"message_status": "delivered",
"status_data": {
"outbound_time": "2023-03-21 16:55:25",
"receipt_time": "2023-03-21 16:55:49",
"sms_id": "1679387065399_15_17155_881597_0poco8$+115927992951",
"user_id": 15,
"msg_type": 2,
"template_id": 881597,
"message": "successfully delivered",
"sms_user": "huangli_SMS",
"template_type": 1,
"msg_count": 1,
"label_id": 0
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます
SMS配信失敗ステータスメッセージ
status
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_status | string | delivered_failed |
| status_data | json object | ステータスデータ |
| template_id | int | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| label_id | int | ラベルID |
| user_id | int | ユーザーID |
| sms_user | string | SMSユーザー |
| sms_id | string | 受信者のSMS ID |
| outbound_time | string | リクエストチャネル時間 |
| receipt_time | string | 受信時間 |
| msg_count | int | SMSの数 |
| msg_type | int | メッセージタイプ |
| error_code | int | エラーコード |
| error_detail | json | エラー詳細 |
| message | string | エラーログ |
| sub_stat | int | エラーサブクラス。4xxは処理失敗、5xxは送信失敗を示す |
| sub_stat_desc | string | エラーメッセージ |
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"to": "+8618871186627",
"itime": 1679392394120,
"status": {
"message_status": "delivered_failed",
"error_code": 480,
"error_detail": {
"message": "smsworker:local policy restrictions",
"sub_stat": 480,
"sub_stat_desc": "sending type not supported"
},
"status_data": {
"sms_id": "1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"user_id": 15,
"msg_type": 2,
"template_id": 881599,
"outbound_time": "2023-03-21 17:53:14",
"receipt_time":"2023-03-21 17:53:37",
"sms_user": "xiaojinmintest",
"template_type": 2,
"msg_count": 1,
"label_id": 0
}
}
}
{
"server": "sms",
"message_id": "1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"to": "+8618871186627",
"itime": 1679392394120,
"status": {
"message_status": "delivered_failed",
"error_code": 480,
"error_detail": {
"message": "smsworker:local policy restrictions",
"sub_stat": 480,
"sub_stat_desc": "sending type not supported"
},
"status_data": {
"sms_id": "1679392394031_15_17153_881599_c1fjwa$+8618871186627",
"user_id": 15,
"msg_type": 2,
"template_id": 881599,
"outbound_time": "2023-03-21 17:53:14",
"receipt_time":"2023-03-21 17:53:37",
"sms_user": "xiaojinmintest",
"template_type": 2,
"msg_count": 1,
"label_id": 0
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます
SMSレスポンスコールバック
URL
ユーザーがウェブページでカスタム入力
ユーザーがウェブページでカスタム入力
このコードブロックはフローティングウィンドウ内に表示されます
Content-Type:
application/json; charset=utf-8
application/json; charset=utf-8
このコードブロックはフローティングウィンドウ内に表示されます
HTTPリクエストメソッド
post
post
このコードブロックはフローティングウィンドウ内に表示されます
リクエストヘッダー
| ヘッダー | タイプ | 説明 |
|---|---|---|
| X-SMSHook-Signature | string | 署名 |
| X-SMSHook-Timestamp | long | メッセージタイムスタンプ |
| X-SMSHook-AppKey | string | アプリケーション |
| X-SMSHook-Version | string | バージョン |
リクエストボディ
| パラメータ | タイプ | 説明 |
|---|---|---|
| message_id | string | メッセージID |
| to | string | 受信者の電話番号 |
| server | string | sms |
| itime | long | メッセージ生成タイムスタンプ |
| custom_args | json | 顧客が定義したカスタムフィールド |
| response | json | メッセージステータスコールバック |
SMS返信レスポンスメッセージ
response
| パラメータ | タイプ | 説明 |
|---|---|---|
| event | string | reply |
| response_data | json object | レスポンスデータ |
| template_id | int | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| label_id | int | ラベルID |
| user_id | int | ユーザーID |
| sms_user | string | SMSユーザー |
| sms_id | string | 受信者のSMS ID |
| reply_content | int | 返信内容 |
| reply_time | string | 返信時間 |
| msg_type | int | メッセージタイプ |
{
"server": "sms",
"message_id": "1679364048767_15_15814_905354_3y5z9a$17858502021",
"to": "17858502021",
"itime": 1679392394128,
"response": {
"event": "reply",
"response_data": {
"sms_id": "1679364048767_15_15814_905354_3y5z9a$17858502021",
"user_id": 15,
"reply_time": "2023-03-21 10:07:17",
"msg_type": 2,
"template_id": 905354,
"sms_user": "cpx_sms",
"template_type": 2,
"reply_content": "T",
"label_id": 0
}
}
}
{
"server": "sms",
"message_id": "1679364048767_15_15814_905354_3y5z9a$17858502021",
"to": "17858502021",
"itime": 1679392394128,
"response": {
"event": "reply",
"response_data": {
"sms_id": "1679364048767_15_15814_905354_3y5z9a$17858502021",
"user_id": 15,
"reply_time": "2023-03-21 10:07:17",
"msg_type": 2,
"template_id": 905354,
"sms_user": "cpx_sms",
"template_type": 2,
"reply_content": "T",
"label_id": 0
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます
SMS通知コールバック
SMSテンプレート承認通知メッセージ
notification
| パラメータ | タイプ | 説明 |
|---|---|---|
| event | string | template_approval |
| notification_data | json object | レスポンスデータ |
| template_id | string | テンプレートID |
| template_type | int | SMSコンテンツタイプ |
| user_id | string | ユーザーID |
| msg_type | int | メッセージタイプ |
| approval_status | string | テンプレート承認結果 |
| approval_message | string | テンプレート承認メッセージ |
{
"server": "sms",
"message_id": "1679364048767_15_15864",
"to": "17858502021",
"itime": 1679392394179,
"notification": {
"event": "template_approval",
"notification_data": {
"user_id": 15,
"msg_type": 2,
"template_id": 905354,
"template_type": 2,
"approval_status": "1",
"approval_message": "pass"
}
}
}
{
"server": "sms",
"message_id": "1679364048767_15_15864",
"to": "17858502021",
"itime": 1679392394179,
"notification": {
"event": "template_approval",
"notification_data": {
"user_id": 15,
"msg_type": 2,
"template_id": 905354,
"template_type": 2,
"approval_status": "1",
"approval_message": "pass"
}
}
}
このコードブロックはフローティングウィンドウ内に表示されます









