跳转到主要内容
GET
curl
Didit 的消息同意 API 会返回收件人在您应用有记录的每个渠道上的同意状态,以及每条记录的来源和变更时间。 没有记录的渠道不会列出。 to 为以下三种收件人类型之一,每种类型有各自的渠道: 在路径中对 to 进行百分号编码:号码中的 + 需要编码为 %2B。 不属于这三种类型的 to 返回 {"channels": [], "reassigned": false}。 reassigned 始终为 false:本版本不检测号码是否已更换所有者,也不会因此跳过任何发送。 具有作用域的 API 密钥需要拥有读取消息的权限。
如需记录选择加入或选择退出,请更新同意状态。

授权

x-api-key
string
header
必填

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

路径参数

to
string
必填

The recipient: an E.164 number (+ and up to 15 ASCII digits), an email address, or a WhatsApp business-scoped user id.

示例:

"+34600000012"

响应

The recipient's consent per channel.

channels
object[]
必填

The recipient's consent per channel, for the channels you have a record on.

reassigned
boolean
必填

Always false: this release does not detect that a number changed owner, and no send is skipped for it.

最后修改于 2026年11月24日