Media templates using sample's URL #83
-
Hello, I have created custom image and video templates. When I send an API request to get the template I get this response: { All good so far. Now I want to use this template to send a message to people, but I don't want to upload a new image or video, I want to use the media I already uploaded when creating the template, so I used the example's header_handle as the URL. But when I try to send it I get this error from the webhook: "errors": [ Is there a way to use the media I already uploaded when creating the template? If not, do I have to implement functionality in my site to upload media to WhatsApp and then use them when selecting a media template? was trying to avoid that because it is a lot of work! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi, did you define your app name and version check this discussion for your reference #74 It is a security feature added from cloud API to authorize the download of media. The links generated from cloud API is only valid for 5 minutes which they expire. The other workaround, if your media is hosted in a cloud storage or cdn you can use those links to display media template messages. |
Beta Was this translation helpful? Give feedback.
I have used this code:
On my side, it is working well as you can see in the screenshots below:
Getting Media Id
Getting Media Url
Downloading the media
Producing the argument null error
If you don't specify the app name and version on DI level you will get the error below but I have added additional parameters on the next update to specify appname and version on the Downloadasync method