直接发送消息

直接发送出站WhatsApp消息。

消息同步提交到WhatsApp Business API。通常用于发送OTP和即时消息。

如果我们尝试请求WhatsApp Business API并收到错误响应,响应体字段error.whatsappApiError将被包含。

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

WhatsApp Business API 默认支持每个商务电话号码最多 80 MPS(每秒消息数)。吞吐量包括入站和出站消息以及所有消息类型。

👍

For more specific request examples, seeWhatsApp Messaging Examples.

🚧

See WhatsApp Errors for error handling.

Body Params
string
required

发送者的电话号码,格式为E.164

string
required

接收者的电话号码,格式为E.164

string
enum
required

WhatsApp出站消息类型。
另请参阅WhatsApp消息

template
object

typetemplate时必需。

text
object

typetext时必需。

image
object

typeimage时必需。

video
object

typevideo时必需。

audio
object

typeaudio时必需。

document
object

typedocument时必需。

sticker
object

type为sticker时必需。

location
object

typelocation时必需。

interactive
object

typeinteractive时必需。

contacts
array of objects

typecontacts时必需。

contacts
reaction
object

typereaction时必需。

context
object

用于提及您正在回复的特定消息。回复可以是任何消息类型。

string

用于引用对象的唯一字符串(推荐)。这可以是订单号或类似标识符,可用于将对象与您的内部系统进行对账。

boolean

可选。
如果设置为true,消息将不会发送给已取消订阅您账户的用户。默认为false

仅用于POST /v2/whatsapp/messages。如果用户已取消订阅,我们将推送webhook通知,whatsappMessage.errorCode设置为RECIPIENT_UNSUBSCRIBED

不适用于POST /v2/whatsapp/message/sendDirectly

boolean

可选。
如果设置为true,消息将不会发送给您阻止列表中的用户。默认为false

仅用于POST /v2/whatsapp/messages。如果用户在您的阻止列表中,我们将推送webhook通知,whatsappMessage.errorCode设置为RECIPIENT_IN_BLOCK_LIST

不适用于POST /v2/whatsapp/message/sendDirectly

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json