Supported media types for incoming messages #127
Replies: 5 comments 8 replies
-
Hi, could you elaborate more on what incoming means here? Do you mean that to upload a media you must submit a supported type, but when querying a media you could get an unsupported type? |
Beta Was this translation helpful? Give feedback.
-
I mean when we receiving a new message via webhook. Then next step is to use the media-id to get the meta information of the attachment/media and then next step to download the file. So for my understanding this defined media types in the whatsapp cloud api looks for me only for restriction in the outgoing part (upload the media). |
Beta Was this translation helpful? Give feedback.
-
Interesting. I haven't seen any examples for downloading other media types. If that's possible then we'd need to remove the restriction for download. Did you manage to reproduce it? |
Beta Was this translation helpful? Give feedback.
-
Yes, I tested a lot of different file types, for example this is a incoming message on the webhook with some special type:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting @dominikklein. We should remove the validation for now when downloading the image. If you want to contribute, all we need to do is:
|
Beta Was this translation helpful? Give feedback.
-
I know that we have this list of supported media types, which are also correctly implemented: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media
When I saw it correctly the types are checked for incoming messages inside the gem here, but for me, it looks like this restriction is only for outgoing messages, because here also the API returns error messages for media types outside of this defined list.
I see that for incoming messages the payloads have all the correct data for other media types and manually I can also get the media information from the media id and download this kind of file with the given media url.
What are you thinking about this situation?
Beta Was this translation helpful? Give feedback.
All reactions