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.
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:
Name: Custom Yahoo Sports
Authorization Base URL: https://api.login.yahoo.com/oauth2/request_auth
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: