# New API - Create clip API always get 401 error

**URL:** <https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929>\
**Category:** API\
**Created:** [January 25, 2018, 5:49am UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929 "2018-01-25T05:49:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tetsuki8385](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tetsuki8385](https://staging-discuss.dev.twitch.com/u/tetsuki8385)\
**Post date:** [January 25, 2018, 5:49am UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/1 "2018-01-25T05:49:56Z")

</div>

Hi all,

I got an issue while call API create clip on Twitch new API. First, I create a token with scope clips:edit and then using that token to call create clip API, but it always return 401 Unauthorized with message “Missing clips:edit scope”

Note: I used Postman to call API for testing. Please see attached screenshots  
[http://i63.tinypic.com/9s8j9i.png](http://i63.tinypic.com/9s8j9i.png)  
[http://i65.tinypic.com/19xeop.png](http://i65.tinypic.com/19xeop.png)

.

Anyone can help me on this? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Dist](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://staging-discuss.dev.twitch.com/u/Dist)\
**Post date:** [January 25, 2018, 12:20pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/2 "2018-01-25T12:20:04Z")

</div>

Have you checked the token itself by passing it to the root kraken endpoint [https://api.twitch.tv/kraken/](https://api.twitch.tv/kraken/) as the header `Authorization: OAuth .....`? This’ll let you confirm it’s both a valid token and has the correct scope.

Secondly, are you sure it’s a user access token and that you’re not trying to use an app access token?

---

<div class="post-metadata">

**Author:** ![tetsuki8385](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tetsuki8385](https://staging-discuss.dev.twitch.com/u/tetsuki8385)\
**Post date:** [January 25, 2018, 1:38pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/3 "2018-01-25T13:38:01Z")

</div>

Hi Dist,

Thanks for your promptly response. Actually, I’m using app access token to call create clip API because I don’t see any documents mentions (or i’m missing) that we must use user access token for create clip API. I just use app access token for almost new APIs, I don’t get any problems.

Anyway, I have just tried with user access token. It is OK now. Thanks so much!

---

<div class="post-metadata">

**Author:** ![Dist](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://staging-discuss.dev.twitch.com/u/Dist)\
**Post date:** [January 25, 2018, 1:54pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/4 "2018-01-25T13:54:55Z")

</div>

Any time you are performing an API request on behalf of a user you need to use a user access token. In the case of create clip the docs mention: `The new clip is marked as having been created by the user specified by the OAuth token ....` which is why you need a user token and the appropriate scope.

A simple guide to follow is that if no token is required at all, then you can use an app access token to make use of increased Helix rate limits. If a token is required then it’ll be a user token with whatever scopes that endpoint needs.

---

<div class="post-metadata">

**Author:** ![tetsuki8385](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tetsuki8385](https://staging-discuss.dev.twitch.com/u/tetsuki8385)\
**Post date:** [January 25, 2018, 2:08pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/5 "2018-01-25T14:08:24Z")

</div>

Thanks for your explain. It’s clear.

---

<div class="post-metadata">

**Author:** ![bribrobot](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/bribrobot/32/4252_2.png) [@bribrobot](https://staging-discuss.dev.twitch.com/u/bribrobot)\
**Post date:** [February 12, 2018, 5:32pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/6 "2018-02-12T17:32:38Z")

</div>

> [@Dist](#):
>
> the docs mention: `The new clip is marked as having been created by the user specified by the OAuth token` … which is why you need a user token and the appropriate scope.

Wonder if the doc language can nonetheless be improved to add a stronger warning to the docs that only `oauth` tokens are valid to use for this. I also didn’t make the connection when reading and fiddled with non-`oauth` tokens for a while before Googling to find this thread 😄

Happy to take a stab at a re-wording though not sure if docs are driven from a GitHub repo?

---

<div class="post-metadata">

**Author:** ![Dist](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://staging-discuss.dev.twitch.com/u/Dist)\
**Post date:** [February 12, 2018, 5:50pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/7 "2018-02-12T17:50:12Z")

</div>

If the docs are to be changed it’s up to Twitch. It’s not the clearest of wording, but it is mentioned, and it makes sense that a user token is needed as it is an endpoint that requires a specific scope to perform actions on behalf of a user.

---

<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:** [March 14, 2018, 5:50pm UTC](https://staging-discuss.dev.twitch.com/t/new-api-create-clip-api-always-get-401-error/13929/8 "2018-03-14T17:50:23Z")

</div>

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