快速入門
傳送圖片和檔案
先確認渠道能力,準備可存取的媒體 URL,並選擇支援的訊息類型。
開始使用
- 1
- 2
參數從哪裡取得
回覆時將 message.received 的 data.conversation.id、data.conversation.type 複製到 to.id、to.type。新收件方請依渠道標識規則處理。
傳送文字訊息 - 3
傳送媒體訊息
先確認渠道能力,準備可存取的媒體 URL,並選擇支援的訊息類型。
傳送媒體訊息curl -X POST "https://api.unifyport.ai/v1/messages" \ -H "X-Api-Key: <YOUR_API_KEY>" \ -H "Content-Type: application/json" \ -d '{ "account_id": "acc_example", "to": { "id": "user_example", "type": "user" }, "message": { "type": "video", "url": "https://cdn.example.com/video/demo.mp4", "caption": "hello video" }, "provider_data": { "seconds": 12 } }' - 4
如何理解結果
保留回傳的 message_id 與 provider_ref,用於關聯後續事件或排查。accepted 不表示已送達;僅在管道支援回執時,透過對應事件確認送達。識別碼格式因管道而異。
Webhook 投遞與簽章驗證