API Connector Documentation
Import Yahoo Fantasy Sports Data to Google Sheets
In this guide, we’ll walk through how to import Yahoo Fantasy Sports 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
- Part 1: Get Your Yahoo Fantasy Sports Credentials
- Part 2: Connect the Yahoo Fantasy Sports API to API Connector
- Part 3: Get Yahoo Fantasy Sports Data in Sheets
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get your Yahoo Fantasy Sports Credentials
- Log in to Yahoo and navigate to https://developer.yahoo.com/apps/create/
- You'll be prompted to give your application a name and description. Make sure to use the redirect URL provided in this article on configuring custom OAuth. Select OAuth Client type of confidential client, choose API Permissions of Fantasy Sports, and click Create App.
- You'll now be presented with your client ID and secret. Copy these, we'll need them shortly.
Part 2: Connect Yahoo Fantasy Sports to API Connector
- Open up Google Sheets and click Extensions > API Connector > Manage Connections
- Scroll to the bottom of the sidebar and click Add Custom OAuth
- Fill in the Custom OAuth modal as follows:
- OAuth Grant Type:
Authorization Code
- Name:
Custom Yahoo Sports
- Authorization Base URL:
https://api.login.yahoo.com/oauth2/request_auth
- Token URL:
https://api.login.yahoo.com/oauth2/get_token
- Client ID: provided by Yahoo
- Client Secret: provided by Yahoo
- OAuth Grant Type:
- Click Save
- Click Manage Connections to return to the list of connections
- Scroll down until you find your new custom connection. Click Connect
- You'll be prompted to give access to the new app you created above. Click Agree
- You'll be returned to your sheet and can verify that the new connection is now active.
Part 3: Get Yahoo Fantasy Sports Data in Sheets
To create a request, include your full request URL in the request URL field, and select your custom Yahoo Sports connection from the dropdown OAuth menu.
You can see the full list of available endpoint and parameters in the API documentation. For example, to get NFL teams for the logged in user, run a request like this:
- Application:
Custom
- Method:
GET
- Request URL:
https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nfl/teams
- OAuth:
Custom Yahoo Sports
Part 4: API Documentation
Official API documentation: https://developer.yahoo.com/fantasysports/guide/