Skip to content

Conversation

@rafaelqueiroz
Copy link

Bug

I got a webhook notification from WhatsApp to verify a number, and their internal number doesn't contain a Profile name. Currently, my application is returning an error for the webhook, and WhatsApp is still trying to process the event for a few days/

Payload:

 {
	"object": "whatsapp_business_account",
	"entry": [
		{
			"id": "820875440573402",
			"changes": [
				{
					"value": {
						"messaging_product": "whatsapp",
						"metadata": {
							"display_phone_number": "******",
							"phone_number_id": "**********"
						},
						"contacts": [
							{
								"wa_id": "447710173736"
							}
						],
						"messages": [
							{
								"from": "447710173736",
								"id": "wamid.HBgMNDQ3NzEwMTczNzM2FQIAEhgSREU3NzBDMEFFRUY0OEFDNEVFAA==",
								"timestamp": "1764898735",
								"text": {
									"body": "12345 is your Instagram code. Don't share it."
								},
								"type": "text"
							}
						]
					},
					"field": "messages"
				}
			]
		}
	]
}

Exception:

ErrorException
Undefined array key "profile"

Netflie\WhatsAppCloudApi\WebHook\Notification\MessageNotificationFactory->decorateNotification()
vendor/netflie/whatsapp-cloud-api/src/WebHook/Notification/MessageNotificationFactory.php:133

@rafaelqueiroz rafaelqueiroz changed the title Error - Support empty profile name on Notification Bug - Support empty profile name on Notification Dec 9, 2025
@rafaelqueiroz rafaelqueiroz changed the title Bug - Support empty profile name on Notification Bug - Support empty profile name of Contact Dec 9, 2025
@rafaelqueiroz
Copy link
Author

Please take a look when you can @aalbarca, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants