Cant get any document sent by a user to my what's app phone number
1

Hi team, I got a webhook call of a user sent a document to WABA and here is the payload

{object=whatsapp_business_account, entry=[{id=XXXXXX, changes=[{value={messaging_product=whatsapp, metadata={display_phone_number=XXXXXXX, phone_number_id=XXXXXXX}, contacts=[{profile={name=Tamer Saleh}, wa_id=XXXXX}], messages=[{from=XXXXX, id=wamid.XXXXXXXXXX, timestamp=1725789603, type=document, document={filename=1234.pdf, mime_type=application/pdf, sha256=SxpZREIsy8I0sbXXXXXXXXX=, id=542732008178492}}]}, field=messages}]}]}

So after that I've followed all the instructions step by step mentioned here

I have taken this media id of "542732008178492" and call the media API to get the media URL:

and here is the response:

{ "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=542732008178492&ext=XXXXXXX&hash=ATsU-RWGInruXXXXXXXXXXX "mime_type": "application\/pdf", "sha256": "XXXXXXXXXXX" "file_size": 778230, "id": "542732008178492", "messaging_product": "whatsapp" }

And before the URL expiry of the 5 min is passed I tried to call this URL and I included the Authorization in the header as well, I always receive 200-Ok with no file content returned [Attached]

Can you plz help me out?

Tamer
تم طرح السؤال منذ حوالي ‏٤‏ أشهر
الإجابة المحددة
1

I fixed it, it was just a wrong Rest client

‏١٨ سبتمبر‏‏١١:٣٢ م‏111
Tamer