Get users 401[Must provide a valid Client-ID or OAuth token]

i try to see users info, but i get 401 error
I thought that the problem was in the client_id, but my twitch bot was working without problems

{“error”:“Unauthorized”,“status”:401,“message”:“Must provide a valid Client-ID or OAuth token”}

The problem is your querystring, change ?client_id=XXX to &client_id=XXX

A ? separates the base part of the URL form the query string, and each parameter in the query string needs to be separated by an &

Helix requires client ID/authorization to be passed by headers, as far as I know.

1 Like

Ah, you’re right. I didn’t notice he was using Helix. So yeah, try sending the client id as the Client-ID header. still 401

You need to send it as a header, not a query string parameter.

1 Like

yea, thx, now it`s work!

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