All Requests seem to be POST request. All request go to https://gql.twitch.tv/gql
.
Authentication is done with headers. You'll need a Client ID and a OAuth token.
Available Scopes are:
scope | description |
---|---|
chat_login | (Deprecated — cannot be requested by new clients.) Log into chat and send messages. |
user_presence_friends_read | Read current online friends? |
user_read | Read nonpublic user information, like email address. |
user_subscriptions | Read a user’s subscriptions. |
channel_commercial | Trigger commercials on channel. |
channel_editor | Write channel metadata (game, status, etc). |
channel_feed_edit | Add posts and reactions to a channel feed. |
channel_feed_read | View a channel feed. |
channel_feed_report | |
channel_read | Read nonpublic channel information, including email address and stream key. |
collections_edit | Manage a user’s collections (of videos). |
communities_edit | Manage a user’s communities. |
communities_moderate | Manage community moderators. |
user_edit | Manage a user object. |
user_entitlements_read | |
user_follows_edit | Manage a user's follows? |
user_friends_edit | Manage a user's friends? |
user_friends_read | Read a user's friends? |
user_presence_edit | Manage a users's online status? |
user_subscriptions_edit | Manage a users's subscriptions? |
?
means unconfirmed. These are also the scopes a token used on the website has.
Required Headers:
Client-Id: <client id>
Authorization: OAuth <token>
[{
"operationName": <operation>,
"variables": {<variables>},
"extensions": {
"perisistendQuery": {
"version": 1,
"sha256sum": "b78cdb8306c3b485be4493d6ebcd50143a28c7fbfc42bf2675cff40d9f8e2ca6"
}
}}]
You can append multiple operations.
Get historical messages sent by a user in a channel. You need to be moderator in the channel for this.
None? I dunno.
key | type | value |
---|---|---|
senderID | number | sender user id |
channelLogin | string | channel login name |
cursor | string | a cursor or null |
includeAutoModCaughtMessages | boolean | whether to include messages caught by automod |