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.

Tag:rest, api, whatsapp

2 comments.

  1. Community

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

    What you're looking at is the WhatsApp account information from Business Manager.

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

    Each client is registered with a specific phone number, so you know what phone number you're using to send the messages.

    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.

    1. Blackfire

      Thank you for the clarification!

Add a new comment.