Get an API access token
Most programmatic interactions with Airbyte require an access token. An access token represents an individual Airbyte user, and it has the same permissions as that Airbyte user.
Using a service account for this purpose is helpful. If you rely on making requests to the Airbyte API using personal credentials, your apps and scripts could break if someone leaves your organization.
The process to generate an access token involves two steps.
- Create an application in Airbyte.
- Use that application to get an access token.
Prerequisites
You need access to either of the following:
- An Airbyte Cloud organization
- A self-managed deployment of Airbyte that exposes the
airbyte-serverservice
Step 1: Create an application
An Airbyte application represents an individual user using a client ID and client secret.
- Cloud
- Core
- Self-Managed Enterprise
-
In Airbyte's UI, click your name > User settings > Applications.

-
Click Create an application.
-
Give your application a descriptive name and click Submit.

-
Click the icon to expose your client secret.

Since Airbyte Core only has a single user, Airbyte already provides an application with a client ID and client secret for you.
In Airbyte's UI, click User > User settings > Applications. Click the icon to expose your client secret.

If you deploy Airbyte with abctl, you can also use the command line interface to see your client ID and client secret.
-
In Airbyte's UI, click your name > User settings > Applications.

-
Click Create an application.
-
Give your application a descriptive name and click Submit.

-
Click the icon to expose your client secret.

Step 2: Get an access token
You can exchange your client ID and client secret for an access token. Use this access token to make requests. Access tokens expire in 15 minutes. Each time your access token expires, request a new one.
- Manually
- Cloud
- Self-Managed
- Terraform and SDKs
You can manually generate an access token from Airbyte's UI.
-
Still on the Applications page, hover over the application for which you want to generate an access token.
-
Click Generate access token.
-
Click Copy or Download access token.
-
Close the dialog.
Make a POST request to the API, replacing the client ID and client secret placeholders below with your actual client ID and client secret.
curl --request POST \
--url https://api.airbyte.com/v1/applications/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"client_id": "<YOUR_CLIENT_ID>",
"client_secret": "<YOUR_CLIENT_SECRET>",
"grant-type": "client_credentials"
}
'
If your request was successful, the API returns your access token with an expiry time.
{
"access_token": "<YOUR_ACCESS_TOKEN>",
"token_type": "Bearer",
"expires_in": 900
}
For more examples, see Get an access token.
Make a POST request to the API, replacing the Airbyte URL, client ID and client secret placeholders below with your actual Airbyte URL, client ID, and client secret. If Airbyte is running locally, your Airbyte URL is probably http://localhost:8000.
curl --request POST \
--url <YOUR_AIRBYTE_URL>/api/public/v1/applications/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"client_id": "<YOUR_CLIENT_ID>",
"client_secret": "<YOUR_CLIENT_SECRET>",
"grant-type": "client_credentials"
}
'
If your request was successful, the API returns your access token with an expiry time.
{
"access_token": "<YOUR_ACCESS_TOKEN>",
"token_type": "Bearer",
"expires_in": 900
}
For more examples, see Get an access token.
The Terraform Provider and SDKs can handle this for you. Initialize the Provider/SDK with the Client Credentials grant type using your Application's client_id and client_secret.
Step 3: Use your access token
Once you have an application and/or access token, use it to make requests from your source code. Learn more in the Developers section.