How to create OAuth2 credentials for Airtable

How to create OAuth2 credentials for Airtable

In this guide, I will share the process for customizing the auth config for Airtable. So, let’s begin.

Setting up Airtable

In this section, we’ll go through the process of setting up Airtable and creating an OAuth application.

NOTE: If you already have an Airtable OAuth app, and access to the Client ID and Client Secret, you can skip this section.

Step 1: Create an Airtable OAuth App

Visit the Airtable Developer Portal and create a new OAuth integration.

A developer-level integration is required because you’ll need to create an OAuth app, which is how Airtable grants secure API access to your application.

Step 2: Register Your OAuth App and Generate Credentials

Once your developer access is ready, you can register an OAuth app and generate the Client ID and Client Secret.

  1. Navigate to your Airtable developer account.

  2. In the left-hand menu, click OAuth integrations in the Guide Section.

  3. In the top-right corner, click + New OAuth Integration.

  1. Fill in your app details, such as name and description. The website field is optional. These details will be shown to users when they authenticate your app with Airtable.

Now, you’ll need the OAuth credentials. After saving, Airtable will show the Client ID and Client Secret. Copy them somewhere safe.

Step 3: Set the Authorized Redirect URI

You’ll also need to configure the Authorized Redirect URI to point to Composio’s callback URL.

In the Redirect URLs section of your Airtable OAuth app, add the following URL:

<https://backend.composio.dev/api/v3/toolkits/auth/callback>

Make sure there’s no trailing slash, and the protocol is https.

That’s all you need to set up on the Airtable side.

Creating the Auth Config in Composio

With your OAuth credentials ready, navigate to the Composio dashboard to configure the authentication settings for Airtable.

  1. Click on the Create Auth Config button to get a list of all the toolkits available.

  1. In the sidebar that opens, choose Airtable for the toolkit. Stick with all the default settings for now, as we'll configure it shortly.

  2. Ensure the authentication is set to OAuth2 and not Bearer Token.

  1. Also, make sure to check "Use your own developer authentication"

  1. Then, click Create Airtable Auth Config.

  2. Once you have the auth config for Airtable set up, go to the Manage Auth Config tab, where you can fill in the auth config fields.

  3. Paste the Client ID and Client Secret you just copied from Airtable into their respective fields.

You can also customise the auth scopes if needed. Example default scopes:

Authorize and Connect

  1. In Composio, click "Connect Account" on the Airtable authentication configuration.

  2. The Airtable consent screen will open, showing requested permissions.

  3. Select the bases/workspaces to grant access and click Approve.

  4. Composio stores the access token upon successful authorization.

Tip: If something fails, double-check the redirect URL matches exactly.

Finally, set the Base URL to:

<https://api.airtable.com>

This is the endpoint for all Airtable API calls.

Once done, copy the auth config ID (which starts with ac_) and use it in your application code via a secret manager.

Your custom Airtable auth config is now ready to go!

In this guide, I will share the process for customizing the auth config for Airtable. So, let’s begin.

Setting up Airtable

In this section, we’ll go through the process of setting up Airtable and creating an OAuth application.

NOTE: If you already have an Airtable OAuth app, and access to the Client ID and Client Secret, you can skip this section.

Step 1: Create an Airtable OAuth App

Visit the Airtable Developer Portal and create a new OAuth integration.

A developer-level integration is required because you’ll need to create an OAuth app, which is how Airtable grants secure API access to your application.

Step 2: Register Your OAuth App and Generate Credentials

Once your developer access is ready, you can register an OAuth app and generate the Client ID and Client Secret.

  1. Navigate to your Airtable developer account.

  2. In the left-hand menu, click OAuth integrations in the Guide Section.

  3. In the top-right corner, click + New OAuth Integration.

  1. Fill in your app details, such as name and description. The website field is optional. These details will be shown to users when they authenticate your app with Airtable.

Now, you’ll need the OAuth credentials. After saving, Airtable will show the Client ID and Client Secret. Copy them somewhere safe.

Step 3: Set the Authorized Redirect URI

You’ll also need to configure the Authorized Redirect URI to point to Composio’s callback URL.

In the Redirect URLs section of your Airtable OAuth app, add the following URL:

<https://backend.composio.dev/api/v3/toolkits/auth/callback>

Make sure there’s no trailing slash, and the protocol is https.

That’s all you need to set up on the Airtable side.

Creating the Auth Config in Composio

With your OAuth credentials ready, navigate to the Composio dashboard to configure the authentication settings for Airtable.

  1. Click on the Create Auth Config button to get a list of all the toolkits available.

  1. In the sidebar that opens, choose Airtable for the toolkit. Stick with all the default settings for now, as we'll configure it shortly.

  2. Ensure the authentication is set to OAuth2 and not Bearer Token.

  1. Also, make sure to check "Use your own developer authentication"

  1. Then, click Create Airtable Auth Config.

  2. Once you have the auth config for Airtable set up, go to the Manage Auth Config tab, where you can fill in the auth config fields.

  3. Paste the Client ID and Client Secret you just copied from Airtable into their respective fields.

You can also customise the auth scopes if needed. Example default scopes:

Authorize and Connect

  1. In Composio, click "Connect Account" on the Airtable authentication configuration.

  2. The Airtable consent screen will open, showing requested permissions.

  3. Select the bases/workspaces to grant access and click Approve.

  4. Composio stores the access token upon successful authorization.

Tip: If something fails, double-check the redirect URL matches exactly.

Finally, set the Base URL to:

<https://api.airtable.com>

This is the endpoint for all Airtable API calls.

Once done, copy the auth config ID (which starts with ac_) and use it in your application code via a secret manager.

Your custom Airtable auth config is now ready to go!