More documentation on STATUS command

documentation
media-upload
api

#1

I am looking over the code fore async upload and there is a command called STATUS that isn’t document anywhere. Can we get anymore info about this command?

async code


#2

When we did the recent migration to our new developer site, unfortunately some of the media API documentation was left behind. I’m working on restoring that! apologies. Hopefully next week…

Basically, once you’ve FINALIZEd an upload, you can check on the completion of ingest via the STATUS command (which will tell you whether the media ID is still being processed, or is complete). Once complete, the media ID can be attached to a Tweet.


#3

The status command stopped working for me. I have a successful FINALIZE and use the media id to try a STATUS and get an invalid Media Id. It appears that anything uploaded since February 1st is not recognized by Twitter 1.1/media/upload.json with Command=STATUS. Any updates on how that works?

For example this id does not work 831553908845580288. It is a video.


#4

Per the docs:

If the response contains a processing_info field, then use the
STATUS command to poll for the status of the FINALIZE operation.

Are you getting processing_info back from FINALIZE?


#5

No I am not getting processing_info in response. I used to get the processing_info and do a STATUS check after the number of seconds until it was ready. Then I would call /1/accounts/9x05if/videos with the id so I could use it on ads. Has something changed in the process? It seems to be completely broken compared to how it used to work.

This is what I get from FINALIZE now:
{“media_id”:831877142266785792,“media_id_string”:“831877142266785792”,“size”:4870916,“expires_after_secs”:86400,“video”:{“video_type”:“video\/mp4”}}

I apologize, the above is what we get back from on the FINALIZE. The previous data I posted was deserialized to one of our objects and had some fields we did not get back from Twitter. Nonetheless, processing_info does not exist in the response and trying to use the media id provided from FINALIZE on the /1/accounts/9x05if/videos endpoint causes an error. When I get a Bad Request the error detail claims “Invalid Media Id”. Sometimes /1/accounts/9x05if/videos endpoint gives me server unavailable. Is there an intermediate step I am missing for the media id to work?


#7

I believe I may have figured this out. It appears that when getting a token for an ad account make sure you are signed in as the Account Creator. I got the token using another user that was an administrator on the account. I guess the STATUS command will only work if the Account Creator is used to get the token. It’s weird that INIT, APPEND and FINALIZE work fine with the other users token but STATUS does not. Also, make sure media_category=‘amplify_video’ on the INIT.