Connect to an OAuth2 API
Most APIs require that you enter some credentials to prove your identity. Usually this will be an API key, which is a unique value similar to a password. With API Connector for Google Sheets, these API keys are easy to use, as they can be simply entered as Header keys or URL query strings. However, many APIs provide access using OAuth 2.0, which is a more secure (and complex) method of authentication and authorization that works through a process of exchanging and refreshing tokens. To enable API access via OAuth 2.0, API Connector includes OAuth 2.0 integrations for several popular API platforms.
This feature is available only for business-plan subscribers, please upgrade to access.
- some APIs provide access only through OAuth 2.0
- connect by clicking a button rather than digging through documentation for API keys
- avoid needing to manually manage the process of exchanging & refreshing tokens
- connect securely, without needing to enter (and potentially reveal) sensitive access credentials.
- To access the current list of integrated OAuth 2.0 platforms, in API Connector navigate to the Create screen and click Manage connections.
- You will see a screen listing the available services.
- Click on the platform you’re interested in connecting to, and you will see a screen on their site prompting you to connect through your account. Every service will look a little different but you may be prompted to accept the connection.
- You’ll now see your new connection reflected in the list. This means you’ve now successfully connected via OAuth 2.0.
Once you have your OAuth 2.0 connection in place, you can select it from the drop-down menu in the Create screen:
The rest of your request will be constructed as usual. Consult your API platform’s documentation for detailed instructions.
- Some APIs provide multiple methods of connecting, e.g. either an API key or OAuth 2.0. If you’re using the OAuth 2.0 method, just skip their instructions for adding an API key. You don’t need to enter any authentication-related headers if you’re using OAuth 2.0.
- If your OAuth 2.0 connection hasn’t been set up, or you no longer have access, you will receive the following error message: “Request failed: Access not granted or expired.”
- API Connector currently provides native OAuth 2.0 integrations for the GitHub API, Harvest API, Instagram Insights API, LinkedIn Ads API, QuickBooks API, Quora Ads API, Vimeo API, and YouTube Analytics API. More integrations are coming soon. Please leave a comment if there are specific APIs you’d like to see.