简体   繁体   中英

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. 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.

following to the documentation you can read the phone numbers and their whatsapp id via

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.

There are two parts to a WhatsApp Business API - WhatsApp Account on Business Manager (Facebook), and WhatsApp Business API Client (docker images).

  1. What you're looking at is the WhatsApp account information from Business Manager.
  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).
  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.

    Follow the official WhatsApp documentation , to get more detailed information about the setup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM