Posts tagged with media

I'm using the Instagram Graph API via https://graph.facebook.com/v21.0 to publish both images and videos on Instagram. Publishing images works without issues, but I'm encountering a problem when attempting to publish videos.

Here’s my process:

1. Create Media Container for Video

I create a media container using the following request:

POST https://graph.facebook.com/v21.0/<user-id>/media {    video_url: video.mp4 (744k, 18s long H264 MPEG-4 AAC)    caption: caption    media_type: REELS    share_to_feed: true    access_token: ... } 

2. Publish Media Using the Container ID Then, I attempt to publish the video with this request:

POST https://graph.facebook.com/v21.0/<user-id>/media {     creation_id: <id-container>     access_token: ... } 

However, this returns a 500 error:

{     "error": {         "message": "An unknown error has occurred.",         "type": "OAuthException",         "code": 1,         "fbtrace_id": <trace-id>     } } 

I can't find anything on the community forum and the bug report is not working either. Any idea what I could try?

I'm trying to send a document media message in Whatsapp Business API using LINK instead of uploading the file, but I got the following error:

"errors":[         {            "code":1008,          "title":"Required parameter is missing",          "details":"Parameter 'id' is mandatory for type 'document'"       }    ] 

Here is the JSON request object:

{      "recipient_type":"individual",    "to":"TELEPHONE_NUMBER_HIDDEN",    "type":"document",    "document":{         "link":"google-drive/https://drive.google.com/open?id=HIDDEN_DOCUMENT_ID",       "provider":{            "name":"google-drive"       },       "caption":"CAPTION MESSAGE"    } } 

Do you have any idea regarding this? I can't use external services like Twilio.