New API - Create clip API error "The 'user_id' parameter cannot be blank."


#1

NOTE: im not native English speaker so maybe containing some grammatical mistakes.

Problem
Create clip API doesn’t work

What I tried

  1. Turn on my stream as Live
  2. Execute command exact same way with sample code
curl -H 'Authorization: Bearer <my access token here>' \
-X POST 'https://api.twitch.tv/helix/clips?broadcaster_id=<my access boradcaster_id here>'

I checked my access token and broadcaster_id are valid.

Response

{
  "error": "Bad Request",
  "status": 400,
  "message": "The 'user_id' parameter cannot be blank."
}

As you can read in above Create Clip instruction manual, this API doesn’t need user_id at the first place.

Additionally, the result wasnt changed if i put user_id in request.

Any idea to solve this problem?


#2

You need to specify a user access token.

It would seem to specified a different kind of token


#3

Thank you, you are right.
I tried with app access tokens thats why my request was denied.


#4

I am also facing this problem. But I am sending the correct access token and I get the following error
{
“error”: “Unauthorized”,
“status”: 401,
“message”: “Must provide a valid Client-ID or OAuth token”
}
Not sure what the problem is


#5

You first need to have requested a User Access Token with the

clips:edit scope applied

And then make the request as documented


#6

Barry,
Thanks for your response. But I am doing all of that but still getting an unauthorised error.

My scopes are
SCOPE : ‘user:read:email clips:edit’

and I am using Postman to fire the call and the actual call is as below

POST /helix/clips?broadcaster_id=41937XXXXX HTTP/1.1
Host: api.twitch.tv
Authorization: Bearer OMMITTED
User-Agent: PostmanRuntime/7.20.1
Accept: /
Cache-Control: no-cache
Host: api.twitch.tv
Accept-Encoding: gzip, deflate
Content-Length: 0
Connection: keep-alive
cache-control: no-cache


#7

You have not included the response

What was the error in this case?

Suggests you got a non 200 code.

Is not a valid broadcaster ID, gonna assume you have scrambled this for no reason.

So I cannot check the status of the stream.

You can only create a clip of a Stream that is live

Omit the whole secret. Not partially, have edited your post