What is the media ID thrown from the communication service advanced messaging to the event grid?

17 Views Asked by At

I have set up a communication service; advanced messaging for WhatsApp message handling, but have not figured out how to retrieve the media sent from my phone to the registered business account.

When I send a photo on WhatsApp, the event grid receives the data:

"data": {
    "channelType": "whatsapp",
    "media": {
      "mimeType": "image/jpeg",
      "id": "0765c98c-7ef2-46dd-9541-560cc2a2c5f0"
    },
    "from": "[my phone number]",
    "to": "[my business phone id]",
    "receivedTimestamp": "2024-02-28T00:27:01+00:00"
  },

But when I try getting the media via https://graph.facebook.com/v18.0/0765c98c-7ef2-46dd-9541-560cc2a2c5f0 by Postman, it says

"error": {
        "message": "Unsupported get request. Object with ID '0765c98c-7ef2-46dd-9541-560cc2a2c5f0' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
        "type": "GraphMethodException",
        "code": 100,
        "error_subcode": 33,
        "fbtrace_id": "AGm5ERYV9wTINW5opvufQ1L"
    }

Then what's this media ID and how to retrieve it?

0

There are 0 best solutions below