Get channel info via channel id

i want to get channel info via channel id i am trying this API from docs<channel ID>

in docs it says it returns specific channel object.
i am executing this like

but its always returns me this error
{"error":"Not Found","status":404,"message":"Unable to find channel for login \"262027661\""}

where i am mistaking?

You need to set a header declaring you want v5 responses.

Without a header it defaults to v3 and you are using V3

For exmaple:

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET,dallasnchains

You need an Accept header in your request declaring v5. Otherwise this end point attempts to lookup by username 262027661 instead of userid 262027661 as thats the behaviour of this end point between v3/v5

1 Like

thanks brother its working now :slight_smile:

1 Like

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