I am trying to post a video through the Threads API in a single-thread post.
I upload the video to a public URL, using Vercel Blob, and I have verified that the video is there.
I use the POST /{threads-user-id}/threads
endpoint to create a media container successfully.
When I use the POST /{threads-user-id}/threads_publish
endpoint to publish the container, I get an error, stating: "The media with id {container-id} cannot be found."
The Threads API Troubleshooting page says: "If you are able to create a container for a video but the POST /{threads-user-id}/threads_publish
endpoint does not return the published media ID, then you can get the container's publishing status by querying the GET /{threads-container-id}
endpoint. ... We recommend querying a container's status once per minute, for no more than 5 minutes."
So I waited for 60 seconds and then queried the GET /{threads-container-id} endpoint
, but it returns the following error:
{
status: 'ERROR',
error_message: 'UNKNOWN',
id: '{threads-container-id}'
}
The same code successfully publishes a single-thread post with an image (using the image_url
parameter instead of video_url
, of course).
I have also verified that the video conforms to Threads' Video Specifications (screenshot attached).
Any suggestions are welcome.
Thanks, Michael
In case this is helpful for debugging, the video is here:
https://fku5s5wau2ccuoic.public.blob.vercel-storage.com/SampleVideo_1280x720_1mb-oGIYmQAizGohakMaHorTkdCRVDlfFE.mp4
The container ID is: 17943515876730115
The fbtrace_id
from the error returned by the POST /{threads-user-id}/threads_publish
endpoint is: AG2eghOPVxr2j4Lu43oWMD9