简体   繁体   English

在WhatsApp商业API帐户中使用不同的电话号码

[英]Using different phone numbers in whatsapp business api account

Following to this documentation https://developers.facebook.com/docs/whatsapp/business-management-api/phone-numbers about whatsapp business accounts, it is possible to have multiple phone numbers in one account. 遵循本文档https://developers.facebook.com/docs/whatsapp/business-management-api/phone-numbers上有关whatsapp商业帐户的信息,一个帐户中可以有多个电话号码。 Does someone know how you can define from which number a message is send, when sending a message to a client? 有人知道您在向客户发送消息时如何定义从哪个号码发送消息吗? There is nothing in the api about sending messages. api中没有关于发送消息的任何内容。

following to the documentation you can read the phone numbers and their whatsapp id via 根据文档,您可以通过以下方式阅读电话号码及其whatsapp ID

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

example result 示例结果

{
  "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"
    }
  ],
}

I would expect something like a senderId field when sending a message. 我希望在发送消息时像senderId字段一样。

There are two parts to a WhatsApp Business API - WhatsApp Account on Business Manager (Facebook), and WhatsApp Business API Client (docker images). WhatsApp商业API分为两部分-业务管理器(Facebook)上的WhatsApp帐户和WhatsApp商业API客户端(docker图像)。

  1. What you're looking at is the WhatsApp account information from Business Manager. 您正在查看的是来自Business Manager的WhatsApp帐户信息。
  2. Once you've added a phone number with a verified_name, you need to download the certificate from Business Manager and use that certified to register your WhatsApp Business API client (docker containers). 添加带有verify_name的电话号码后,您需要从业务管理器下载证书,并使用经过认证的证书注册您的WhatsApp Business API客户端(码头集装箱)。
  3. Each client is registered with a specific phone number, so you know what phone number you're using to send the messages. 每个客户端都注册有一个特定的电话号码,因此您可以知道用于发送消息的电话号码。
  4. This is equivalent to having a separate cell phone for every separate phone number and WhatsApp app on that cell phone. 这相当于为每个单独的电话号码和该手机上的WhatsApp应用拥有一个单独的手机。

    Follow the official WhatsApp documentation , to get more detailed information about the setup. 请遵循WhatsApp官方文档 ,以获取有关设置的更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OneDrive-如何使用Rest API访问我的企业帐户中的用户文件? - OneDrive - how to access files of users in my Business account using the Rest API? 是否可以使用PayPal Rest API获取帐户上的公司名称(“获取用户信息”中缺少)? - Can business name on account be obtained using the PayPal Rest API (missing in “get user information”)? 通过 SAP Business ByDesign 上的 API 更新由帐户支付的供应商发票 - Update Supplier Invoices as Paid by an Account via API on SAP Business ByDesign 当工作空间与帐户上的默认设置不同时,使用Java Rally Rest API插入测试用例结果失败 - Inserting test case result using Java Rally Rest API failing when workspace is different from default set on account 是否有任何whatsapp API可用于在whatsapp中广播消息并发送给我的联系人? - Is any whatsapp API available to broadcast message & sent to my contacts in whatsapp? 针对业务异常的REST API设计 - REST API design on business exceptions CRUD RESTful API中的业务逻辑 - Business Logic in CRUD RESTful API 业务逻辑和静态API设计 - Business logic and restful API design PayPal - 使用REST API从Sandbox切换到Live帐户 - PayPal - switching from Sandbox to Live account using REST API 使用Outlook或Graph Rest API撤消对Microsoft / Outlook帐户的访问 - Revoke access of microsoft/outlook account using outlook or graph rest API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM