<@U04S8PLJWMT> How do I force a low code connector...
# ask-ai
k
@kapa.ai How do I force a low code connector to use refresh tokens to refresh the bearer token for my connection
k
To force a low-code connector to use refresh tokens for refreshing the bearer token in your connection, you need to configure the OAuth authentication method correctly. Here's how you can do it: 1. In your connector's YAML configuration, use the
OAuthAuthenticator
type for authentication. 2. Set up the required fields for OAuth, including: -
token_refresh_endpoint
-
client_id
-
client_secret
-
refresh_token
3. Optionally, you can configure additional fields like
access_token_name
,
expires_in_name
, and
grant_type
. Here's an example of how your authenticator configuration might look:
Copy code
yaml authenticator:   type: "OAuthAuthenticator"   token_refresh_endpoint: "<https://api.example.com/oauth/token>"   client_id: "{{ config['client_id'] }}"   client_secret: "{{ config['client_secret'] }}"   refresh_token: "{{ config['refresh_token'] }}"   access_token_name: "access_token"   expires_in_name: "expires_in"   grant_type: "refresh_token"
Make sure to replace the
token_refresh_endpoint
with the actual endpoint for your API. By setting up the authenticator this way, the connector will automatically use the refresh token to obtain a new access token when needed. The
expires_in_name
field tells the connector how long the access token can be used, and when this time is passed, a new access token will be requested automatically. For more detailed information on configuring OAuth authentication in low-code connectors, you can refer to the [Airbyte documentation on OAuth authentication](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth).
k
I am not using Oauth, I am using an org token and a user token to retrieve a bearer token and then I need to refresh my bearer token using a refresh token