# Create clip endpoint responds with 503 Service Unavailable

**URL:** <https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559>\
**Category:** API\
**Created:** [June 20, 2019, 8:07am UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559 "2019-06-20T08:07:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sammers21](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/sammers21/32/6569_2.png) [@Sammers21](https://staging-discuss.dev.twitch.com/u/Sammers21)\
**Post date:** [June 20, 2019, 8:07am UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/1 "2019-06-20T08:07:25Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 20, 2019, 8:38am UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/2 "2019-06-20T08:38:53Z")

</div>

Broadcaster\_id `34582082864` is invalid.

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

---

<div class="post-metadata">

**Author:** ![Sammers21](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/sammers21/32/6569_2.png) [@Sammers21](https://staging-discuss.dev.twitch.com/u/Sammers21)\
**Post date:** [June 20, 2019, 9:00am UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/3 "2019-06-20T09:00:08Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![george](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/george/32/120_2.png) [@george](https://staging-discuss.dev.twitch.com/u/george)\
**Post date:** [June 20, 2019, 10:54am UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/4 "2019-06-20T10:54:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 20, 2019, 3:49pm UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/5 "2019-06-20T15:49:48Z")

</div>

> [@Sammers21](#):
>
> Can you clarify how to obtain a valid broadcast\_id?

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

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [July 20, 2019, 3:49pm UTC](https://staging-discuss.dev.twitch.com/t/create-clip-endpoint-responds-with-503-service-unavailable/21559/6 "2019-07-20T15:49:48Z")

</div>

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