Skip to content

SAAS Line API webhook

zjc1750514326 edited this page May 23, 2024 · 7 revisions

Line Webhook

消息回调服务

对提供的webhook地址,进行Line业务相关的推送信息(目前支持推送上行消息)

上行消息

下发Viber消息后,对消息状态进行回执推送

  • URL:dr_webhook
  • Method:POST
  • Content-Type:application/json

回执参数

body 参数:

参数名 类型 说明
destination String 商户channelId
events array[event JsonObject] 事件信息

event json obj:

参数名 类型 说明
currency String 币种
localPrice Number 本币价格(CNY)
originalPrice Number 原币价格
rateType String 费率类型

回执示例

failed

{
    "destination": "U44d64355f3d939f4db74649d82dxxxx",
    "events": [
        {
            "type": "message",
            "message": {
                "type": "text",
                "id": "509243235328065891",
                "quoteToken": "d0fu6utH1aziqG3BKtINCjcfF7I5ZFYBYK65sYQnKLrrUvFlP_A_sIU8kfiDFWT7e4PJtevdnaoOchJyX7S1QaHGpHcB51u-Gb7YBP8O-ekuzcyHsIMdG8W-gbbIownHWhEL5OS51peQi-4cdmZ8pQ",
                "text": "测试"
            },
            "webhookEventId": "01HYFM66MC7K0N6QAX1ZVDXD13",
            "deliveryContext": {
                "isRedelivery": false
            },
            "timestamp": 1716363925648,
            "source": {
                "type": "user",
                "userId": "Ua56c6dca206ce700a3f1b0e49dxxxxx"
            },
            "replyToken": "c384d55299124bf4b504e3004fd6bcf0",
            "mode": "active"
        }
    ]
}

delivered

{
    "status": "delivered",
    "requestId": "f6a7d49946094857ae02812969a83056",
    "code": 11001,
    "message": "Viber message has delivered",
    "sendTime": "2023-07-13 15:12:11",
    "cost": {
        "currency": "USD",
        "localPrice": 29.89465,
        "originalPrice": 4.1234,
        "rateType": "Transactional"
    }
}

seen

{
    "status": "seen",
    "requestId": "f6a7d49946094857ae02812969a83056",
    "code": 11002,
    "message": "Viber message has seen",
    "sendTime": "2023-07-13 15:12:11"
}

expired

{
    "status": "expired",
    "requestId": "f6a7d49946094857ae02812969a83056",
    "code": 11003,
    "message": "Viber message has expired",
    "sendTime": "2023-07-13 15:12:11"
}

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally