Search API Connector Documentation

Print

Import Twitch Data to Google Sheets

In this guide, we’ll walk through how to import Twitch data directly into Google Sheets, using the API Connector add-on for Sheets. We'll set up a custom OAuth connection and connect to their API.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get your Twitch OAuth Credentials

  1. Navigate to https://dev.twitch.tv/. You'll need to log in if you haven't already.
  2. In the top right, click Your Console
    twitch-yourconsole
  3. Click Register Your Applicationtwitch-register
  4. Fill out an app name and category, and include the OAuth redirect URL provided here. Click Create.
    twitch-create
  5. You'll see your new application. Click Manage
    twitch-manage
  6. The client ID and secret will be displayed on this page. Copy them and keep them handy, we'll need them shortly.
    twitch-credentials

Part 2: Connect Twitch to API Connector

  1. Open up Google Sheets and click Extensions > API Connector > Manage Connections
  2. Scroll to the bottom of the sidebar and click Add Custom OAuth
  3. Fill in the Custom OAuth modal as follows. If you like, edit the scopes you'd like to have access to.
    1. Name: Custom Twitch
    2. Authorization Base URL: https://id.twitch.tv/oauth2/authorize?scope=user:edit user:read:email user:read:follows
    3. Token URL: https://id.twitch.tv/oauth2/token
    4. Client IDprovided by Twitch
    5. Client Secretprovided by Twitch
  4. Click Save
    twitch-OAuth
  5. Click Manage Connections to return to the list of connections
  6. Scroll down until you find your new custom connection. Click Connect
    twitch-connect
  7. You'll be prompted to give access to the new app you created above. Click Authorize
    twitch-authorize
  8. You'll be returned to your sheet and can verify that the new connection is now active.

Part 3: Get Twitch Data in Sheets

To create a request, include your full request URL in the request URL field, and select your custom Twitch connection from the dropdown OAuth menu.

You can see the full list of available endpoint and parameters in the API documentation. For example, here we'll get information about a specific channel. Substitute in your own client ID where it says your_client_id.

  • Application: Custom
  • Method: GET
  • Request URL: https://api.twitch.tv/helix/channels?broadcaster_id=141981764
  • OAuth: Custom Twitch
  • Headers
    • Client-Id: your_client_id
twitch-response

Part 4: API Documentation

Official API documentation: https://dev.twitch.tv/docs/api/reference/

Leave a Comment

Jump To...