<@U04S8PLJWMT> I am using the airbyte helm chart t...
# ask-ai
r
@kapa.ai I am using the airbyte helm chart to setup the airbyte now I want API key how can I get it to use the curl
k
To use the Airbyte API with a deployment via the Helm chart, you do not generate a traditional "API key" as you might with some other platforms. Instead, Airbyte uses an OAuth-like mechanism with a
client_id
and
client_secret
to obtain a short-lived access token, which you then use as a Bearer token in your API requests. Here’s how you can get the credentials and use them with `curl`: ### 1. Retrieve Your Credentials If you deployed Airbyte on Kubernetes using the Helm chart, your credentials (
client_id
and
client_secret
) are stored in a Kubernetes secret named
airbyte-auth-secrets
. To view them, run:
Copy code
sh kubectl get secret airbyte-auth-secrets -n <YOUR_NAMESPACE> -o yaml
The values will be base64 encoded. Decode them using:
Copy code
sh echo '<base64-value>' | base64 -d
Look for: -
instance-admin-client-id
-
instance-admin-client-secret
-
instance-admin-password
(for UI login, not API) [See more details here.](https://docs.airbyte.com/platform/deploying-airbyte/integrations/authentication) ### 2. Obtain an Access Token Use your
client_id
and
client_secret
to get an access token:
Copy code
sh curl -X POST <YOUR_AIRBYTE_URL>/api/v1/applications/token \   -H "Content-Type: application/json" \   -d '{"client_id": "<your-client-id>", "client_secret": "<your-client-secret>"}'
The response will include an
access_token
(Bearer token). [Reference: Configuring API Access](https://docs.airbyte.com/platform/enterprise-setup/api-access-config) ### 3. Use the Access Token with curl Include the access token in the Authorization header for subsequent API requests:
Copy code
sh curl -X GET <YOUR_AIRBYTE_URL>/api/public/v1/workspaces \   -H "Authorization: Bearer <access_token>"
Note: The access token is short-lived (typically 60 minutes for Enterprise, 3 minutes for some other deployments), so you may need to refresh it regularly. --- If you need to set or override the credentials, you can do so by creating or editing the
airbyte-auth-secrets
Kubernetes secret before deploying or by updating it and restarting the Airbyte server pod if already deployed. [See instructions here.](https://docs.airbyte.com/platform/deploying-airbyte/integrations/authentication) If you were looking for a single static API key (as in some cloud services), Airbyte does not use that model for its API authentication in self-managed deployments. Let me know if you need step-by-step help with any of these commands!
r
@kapa.ai there are two client ids dataplane and instance which should I use
k
A message from kapa.ai
You should use the instance-admin client ID and client secret (not the dataplane credentials) for authenticating with the Airbyte API as an administrator or for general API access. The dataplane client ID and secret are used internally for communication between the control plane and data plane in multi-region or hybrid deployments, not for end-user API authentication. When you retrieve the
airbyte-auth-secrets
secret, look for these keys: -
instance-admin-client-id
-
instance-admin-client-secret
Use these values to obtain your API access token and interact with the Airbyte API via curl or other tools. The dataplane credentials are not intended for this purpose and will not work for API authentication as an end user or admin. This is confirmed in the Airbyte documentation, which shows the
instance-admin-client-id
and
instance-admin-client-secret
as the relevant credentials for API access and authentication workflows [see here](https://docs.airbyte.com/platform/deploying-airbyte/integrations/authentication).