BSUID
A BSUID is a unique user identifier that can be used to message a WhatsApp user when you don’t know their phone number. BSUID will be assigned to the userid parameter and appear in following messages webhooks
Full Guide on Username/BSUID
Read here
API Reference to enable BSUID at app level
https://partner-docs.gupshup.io/docs/api-to-enable-bsuid-flag-for-an-app
API Reference to enable BSUID at partner level for all apps
https://partner-docs.gupshup.io/reference/updatepartnerappconfig
V2 Subscription Events with BSUID Attributes
| Type | Event |
|---|---|
| Outgoing Message | |
| Incoming Message | |
| Coex Outgoing Message | |
| Coex Incoming Message | |
| Voice Template Message | |
V3 Subscription Events with BSUID Attributes
| Type | Event |
|---|---|
| Outgoing Message | |
| Incoming Message | |
| Coex Outgoing Message from WhatsApp Business App | |
| Coex Outgoing Message from Gupshup API | |
| Coex Incoming Message | |
| Voice Template Message | |
Request Contact Info BSUID Webhook Event
Tapping the button opens a native confirmation sheet pre-filled with the user's own number. Not now fires nothing; Send triggers a contacts message webhook.
All three (marketing, utility and interactive) sends produced a webhook. The payloads are structurally identical — only id (wamid) and timestamp differ.
When a user taps the REQUEST_CONTACT_INFO button (or shares a contact directly in chat), a contacts webhook is triggered with message type: contacts.
{
"entry": [
{
"changes": [
{
"field": "messages",
"value": {
"contacts": [
{
"profile": {
"name": "Avadhoot Yadav"
},
"user_id": "IN.3724117084395812",
"wa_id": "917506080480"
}
],
"messages": [
{
"contacts": [
{
"name": {
"first_name": "Avadhoot Yadav",
"formatted_name": "Avadhoot Yadav"
},
"origin": "contact_request",
"phones": [
{
"phone": "+917506080480",
"type": "CELL",
"wa_id": "917506080480"
}
],
"vcard": "QkVHSU46VkNBUkQKVkVSU0lPTjozLjAKTjo7QXZhZGhvb3QgWWFkYXY7OzsKRk46QXZhZGhvb3QgWWFkYXYKVEVMO3R5cGU9Q0VMTDt0eXBlPVZPSUNFO3dhaWQ9OTE3NTA2MDgwNDgwOis5MTc1MDYwODA0ODAKRU5EOlZDQVJE"
}
],
"from": "917506080480",
"from_user_id": "IN.3724117084395812",
"id": "wamid.HBgMOTE3NTA2MDgwNDgwFQIAEhgUM0E4Njc2Q0MyNUVCODQ4RkNCN0YA",
"timestamp": "1788179093",
"type": "contacts"
}
],
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "919355094343",
"phone_number_id": "1314981035021901"
}
}
}
],
"id": "954612427665223"
}
],
"gs_app_id": "03815d0b-4cce-456b-9150-f3a6936f30ec",
"object": "whatsapp_business_account"
}| Field | Location | Description |
|---|---|---|
from_user_id | messages[] | The sender's BSUID. |
origin | messages[].contacts[] | How the contact was shared. |
vcard | messages[].contacts[] | Present only when origin is other. |
| Value | Meaning |
|---|---|
contact_request | User tapped a REQUEST_CONTACT_INFO button. vcard is omitted. |
other | User shared a contact directly from the WhatsApp app. vcard is included. |
Other impacted webhooks :
user_preferences (Both v2 and v3 events are supported)
If enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , username in the v3 webhook
If enableBSUID is is true then the v2 payload will also contain userid , parent_user_id along with existing payload in v2 webhook
Example of v2 payload when enableBSUID is true :
{
"app": "<appName>",
"appId": "<appId>",
"timestamp": <timestamp>,
"version": 2,
"type": "preference-event",
"payload": {
"type": "user_preferences",
"payload": {
"user_preferences": [
{
"wa_id": "919297545638",
"userid": "user_id",//added
"parent_user_id" : "parent_user_id"
"detail": "User requested to stop marketing messages",
"category": "marketing_messages",
"value": "stop",
"timestamp": <timestamp>
}
]
}
}
}
VOICE webhooks (Only v3 webhook supported) :
Call Permission Request v3 webhook
if enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , username , from_user_id , from_parent_user_id in the Call Permission Request v3 webhook
Business-initiated connected calls webhooks :
if enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , profile , to_user_id , to_parent_user_id in the v3 webhook
User-initiated connected calls webhooks :
if enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , username , from_user_id , from_parent_user_id in the v3 webhook
Business-initiated terminated calls webhooks :
if enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , profile , to_user_id , to_parent_user_id in the v3 webhook
User-initiated terminated calls webhooks :
if enableBSUIDV3 is not enabled then it will not contain : userid , parent_user_id , profile , to_user_id , to_parent_user_id in the v3 webhook
Business-initiated calls status webhooks :
If enableBSUIDV3 is not enabled then it will not contain : recipient_user_id , recipient_parent_user_id , contacts in the v3 webhook
Coexistence ( Only v3 webhook supported ):
For smb_message_echoes webhook :
if enableBSUIDV3 is not enabled then it will not contain : contacts , to_user_id , to_parent_user_id in the v3 webhook
Updated about 1 month ago
