Question
Why does the message author or participant address in Twilio Conversations display a Business-Scoped User ID (BSUID) such as whatsapp:CO.XXXXXXXXXXXXXX instead of a phone number, and how can we retrieve the user's phone number?
Product
Twilio Conversations Classic
Answer
The appearance of a Business-Scoped User ID (BSUID) in place of a phone number is due to Meta's WhatsApp Usernames and user privacy controls, which allow WhatsApp users to choose whether their phone number is visible to businesses.
How Phone Number Visibility Works
-
User Shares Phone Number: The Participant resource's
messaging_binding.addresswill contain the user's E.164 phone number. -
User Hides Phone Number: Meta does not transmit the user's phone number to Twilio. Consequently, both the message
authorand the Participant'smessaging_binding.addresswill show the BSUID (for example,whatsapp:CO.XXXXXXXXXXXXXX). Because Twilio never receives the phone number from Meta, it cannot be retrieved via the API or Participant resource.
Additional Information
For more information on privacy settings and username identifiers, see the Twilio WhatsApp Key Concepts Documentation.