Create clip endpoint responds with 503 Service Unavailable

I want to create a clip using the Twitch API.

  1. First of all, I obtain a token by opening in my browser:
    "https://id.twitch.tv/oauth2/authorize?client_id=MY_CLIENT_ID&redirect_uri=MY_URL/&response_type=token&scope=clips:edit"

  2. Trying to create a clip:
    curl -i -H 'Authorization: Bearer OBTAINED_TOKEN' -X POST 'https://api.twitch.tv/helix/clips?broadcaster_id=34582082864'

Response:

HTTP/2 503 
content-type: application/json; charset=utf-8
content-length: 57
server: nginx
access-control-allow-origin: *
cache-control: no-cache, no-store, must-revalidate, private
expires: 0
pragma: no-cache
ratelimit-limit: 800
ratelimit-remaining: 799
ratelimit-reset: 1561017463
twitch-trace-id: afe8e3c81ccbfaf6534b7ae11e26cfaa
vary: Accept-Encoding
x-ctxlog-logid: 1-5d0b3c76-47f1a85408b205de35beccc6
timing-allow-origin: https://www.twitch.tv
date: Thu, 20 Jun 2019 07:57:42 GMT

{"error":"Service Unavailable","status":503,"message":""}

The problem is that the response is always the same. I have attempted to create a clip for a few days in a row, so the problem is always reproduced. I guess something wrong with my code? Or it is a twitch API bug?

Broadcaster_id 34582082864 is invalid.

So invalid, that it’s 503-ing instead of throwing a sensible reponse.

@BarryCarlyon, thank you for the quick response. Can you clarify how to obtain a valid broadcast_id? The one used i got from the helix/stream endpoint and “id” field.

If you are pulling the ID from the streams endpoint than you want user_id instead. User, channel and broadcasters IDs are the same thing in most contexts.

You don’t need a broadcast_id

You need a broadcaster_id which is the same as the user_id of the username of the broadcaster you want to create clips of

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.