Ofek Eliahu
08/12/2025, 12:53 PM{
"access_token": "c97d1fe52119f38c7f67f0a14db68d60caa35ddc86fd12401718b649dcfa9c68",
"token_type": "bearer",
"expires_in": 7200,
"refresh_token": "803c1fd487fec35562c205dac93e9d8e08f9d3652a24079d704df3039df1158f",
"created_at": 1628711391
}
it means that if i want to oauth again i need to use the new refresh token from the response.
i used the Oauth2Authenticator class but it doesn't work with that and I also used the SingleUseRefreshTokenOauth2Authenticator which does works.
my issue is that after the auth method being done the new refresh_token isn't being saved which means the next run or check the oauth method will not work because it is keeps using the initial refresh token which isn't valid anymore
how can i save the new refresh token in the config param inorder to use it in the next connector runkapa.ai
08/12/2025, 12:53 PMrefresh_token property, but this can be customized). - The connector will then automatically update its configuration with the new refresh token for the next run. This is specifically designed for APIs like GitLab and Smartsheet, which use single-use refresh tokens. You must also provide an initial access token and its expiry date for testing and initial setup. References: - [Single-Use Refresh Tokens](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/authentication#single-use-refresh-tokens) - [Update refresh token from authentication response](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/authentication#update-refresh-token-from-authentication-response) Python CDK Connectors: If you are using the Python CDK and the SingleUseRefreshTokenOauth2Authenticator, Airbyte is working on platform support to persist the new refresh token in the config automatically. As of now, this feature depends on the platform handling "control messages" emitted by the connector to update the configuration. If your platform version does not yet support this, the refresh token will not be persisted between runs, and you will encounter the issue you described. Current Status: - The feature to persist the new refresh token is being rolled out in Airbyte ([see forum discussion](https://discuss.airbyte.io/t/3275)). - If your Airbyte instance does not yet support this, you may need to wait for the platform update or use a workaround (such as manually updating the config or using state messages, though this is not the recommended long-term solution). Summary: Enable the "Refresh Token Updater" in declarative connectors or Connector Builder UI. For Python CDK, ensure your Airbyte platform version supports config mutation via control messages for single-use refresh tokens. If not, monitor Airbyte updates for this feature. If you need more specific implementation guidance for your connector type, please specify whether you are using the declarative YAML approach or the Python CDK.Ofek Eliahu
08/12/2025, 12:59 PMkapa.ai
08/12/2025, 12:59 PMkapa.ai
08/12/2025, 1:00 PM