【问题标题】:Using different phone numbers in whatsapp business api account在whatsapp业务api帐户中使用不同的电话号码
【发布时间】:2019-06-25 14:45:07
【问题描述】:

按照此文档https://developers.facebook.com/docs/whatsapp/business-management-api/phone-numbers 关于whatsapp 企业帐户,可以在一个帐户中拥有多个电话号码。有人知道在向客户端发送消息时如何定义从哪个号码发送消息吗? api中没有关于发送消息的内容。

按照文档,您可以通过以下方式阅读电话号码及其whatsapp id

curl -X GET \
'https://graph.facebook.com/v3.3/your-whatsapp-business-account-id/phone_numbers' \
  -d 'access_token=your-access-token'

示例结果

{
  "data": [
    {
      "verified_name": "Jasper's Market",
      "display_phone_number": "+1 631-555-5555",
      "id": "1906385232743451",
      "quality_rating": "GREEN"

    },
    {
      "verified_name": "Jasper's Ice Cream",
      "display_phone_number": "+1 631-555-5556",
      "id": "1913623884432103",
      "quality_rating": "NA"
    }
  ],
}

我希望在发送消息时有类似 senderId 字段。

【问题讨论】:

    标签: rest api whatsapp


    【解决方案1】:

    WhatsApp Business API 有两个部分 - Business Manager (Facebook) 上的 WhatsApp Account 和 WhatsApp Business API Client(docker 图像)。

    1. 您正在查看的是来自商务管理平台的 WhatsApp 帐户信息。

    2. 添加带有验证名称的电话号码后,您需要从商务管理平台下载证书并使用该认证来注册您的 WhatsApp Business API 客户端(docker 容器)。

    3. 每个客户都注册了一个特定的电话号码,因此您知道您使用哪个电话号码发送消息。

    4. 这相当于为每个单独的电话号码和该手机上的 WhatsApp 应用程序配备一个单独的手机。

      关注官方WhatsApp documentation,获取更多详细设置信息。

    【讨论】:

    • 感谢您的澄清!
    猜你喜欢
    • 2022-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多