Upload STATUS throw 503

restapi
media-upload

#1

Whenever I try to access the Upload STATUS endpoint it results in 503.

HTTP/1.1 503 Service Temporarily Unavailable

"errors":  [
     {
      "message": "Over capacity",
      "code": 130
    }

All the other endpoints work properly. Any problem on the servers?


#2

Im getting the same response with uploading a video…


#3

Hello?


#4

Guys could you please reply?


#5

I’ve made the Media Platform team aware of this post as well as this one in order to investigate and respond.


#6

Thanks.


#7

It doesn’t sound like there are issues on the server. One of the engineers was curious to know if you take advantage of the check_after_secs value in the response for how often to re-poll. Making calls in a smaller window would result in this error message. This message can be returned when there is a rate limiting issue, not necessarily a server “over capacity” issue.


#8

I was making only 1 call to the STATUS command.

I will try again today and get back to you.


#9

I can confirm that the problem is still happening for just 1 request to the STATUS COMMAND.

More information below:

Query : https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=730321335977545728

Status Code : 130
Error Description from Twitter : Over capacity


#10

Ok, thanks. And are you waiting for the check_after_secs number of seconds between calling FINALIZE and STATUS? This value is given in both the FINALIZE and STATUS responses. Have you tried increasing that wait time slightly if so?


#11

Hi @jbulava,

I think that is the solution, you should provide the media_category in order to not retrive this error.

In our case (we’re uploading videos) using amplify_video

And now it works like a charm!


#12

I will try this out, is there a documentation listing the different media_category?


#13

Hi @TweetinviApi,

Here you have the docs saying about it : https://dev.twitter.com/rest/reference/post/media/upload-init

Also I’ve found a post from @andypiper talking about the different options Media_category values

But also, if you try thouse values you get an error, and it says what value should be…

It’s a little embarrassing but it works for me!

Regards


#14

Thank you. So the only solution you had was amplify_video.
Have you tried to get the status with an image?

I will try this out tonight when I am out of work.


#15

The thing is that with the images I don’t use chunked upload, son I don’t need INIT / APPEND / …

So I don’t know

Sorry!


#16

@TweetinviApi Did you try the upload with the media_category option?

Thanks!


#17

Hi, I just tried that without success here are my calls :

INIT

https://upload.twitter.com/1.1/media/upload.json?command=INIT&media_type=media&total_bytes=197625&media_category=amplify_video

// Also tried with media_type=video/mp4

APPEND

https://upload.twitter.com/1.1/media/upload.json?command=APPEND&media_id=732187819951656960&segment_index=0

STATUS

Waiting for 2 seconds after the APPEND and then :

https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=732187819951656960


#18

Wow, It’s really stragnte, It works for me now like a charm!..

Could you share your RAW responses?


#19

INIT Query

https://upload.twitter.com/1.1/media/upload.json?command=INIT&media_type=video/mp4&total_bytes=197625&media_category=amplify_video

INIT Response

{“media_id”:732238808478011392,“media_id_string”:“732238808478011392”,“expires_a
fter_secs”:15551999}

APPEND Query

https://upload.twitter.com/1.1/media/upload.json?command=APPEND&media_id=732238808478011392&segment_index=0

APPEND Response

No response -> 200 Status Code

STATUS Query

https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=732238808478011392

STATUS Response

503 Status Code


#20

I think you forgot to do the "FINALIZE Query!

https://dev.twitter.com/rest/reference/post/media/upload-finalize