(V5) get channel , how to?

I want to get channel’s info that i want to get

so I try

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: <Client Id>' \
-H 'Authorization: OAuth <Auth Id>' \
-X GET 'https://api.twitch.tv/kraken/channel' -ik

but I can get only My channel info…

how to get others channel

Get channel by ID:
https://api.twitch.tv/kraken/channels/channel_id

If you’re trying to access by name, I think the only v5 endpoint that allows that is:
https://api.twitch.tv/kraken/users?login=channel_name

There does not appear to be a way to get the channel associated with a user. So if you have (only) a UserID, you have to lookup the username for that id, then lookup the channel id for the channel with the same name as the username, then get that channel’s details by channelID.

/users doesn’t give the channelID, just the UserID. And nowhere is it stated that UserID == ChannelID (In fact, it’s implied they’re not).

Users endpoint:
https://api.twitch.tv/kraken/users/40876073

Channels endpoint:
https://api.twitch.tv/kraken/channels/40876073

While the endpoints have similar data, they each have unique data associated with what they are (users and channels objects). Same ID though.

Where in the documentation does it say that a UserID is the same as a ChannelID? 'cause I’m not seeing that anywhere. You can assume that they’re the same, but if a later change comes along and breaks that, your code is going to break horribly. It also looks like IDs are integers, but Twitch have stated that IDs may be changing to GUIDs, and you should treat them as strings.

Took me a second to find, but here:

Search ID, notice that it refers to channel and user interchangeably.
As far as ID’s being integers, despite some documentation showing integers the push is to change all documentation so that they’re strings (GUIDs). I would assume any interaction with the API to be using string IDs.

That means that the field “_id” could be a user ID, a channel ID, a channel feed ID, a collection ID, a collection item ID, and so on, all dependent on context. If “user ID — Identifies a user, channel, or channel feed, depending on the endpoint.” means that users, channels and feeds all use the same ID, then that is not very clearly articulated, and needs to be stated more clearly.

Each of the bullet-ed IDs in that glossary link is an ID unique from the others.

User ID, channel ID, and channel feed ID all exist as a single bullet item on the list and are thus the same thing. They are not the same however as say a collection or collection item ID.

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