Hi, I’m trying to implement a CommerceTools connec...
# help-connector-development
m
Hi, I’m trying to implement a CommerceTools connector using the Connector Builder UI on Airbyte Cloud. Is there a way to provide Basic Authentication as part of the
client_credentials
grant type on the UI? The API seems to expect this, otherwise it fails to get a token (
401 Client Error: Unauthorized for url: https://….
) due to the fact it is unable to authenticate the request. https://docs.commercetools.com/api/authorization#client-credentials-flow
k
A message from kapa.ai
Based on the information extracts provided, the Connector Builder UI in Airbyte supports Basic HTTP authentication, API Key authentication, Bearer Token authentication, and OAuth authentication with a refresh token grant type. However, it doesn't explicitly mention support for Basic Authentication as part of the
client_credentials
grant type in OAuth. For OAuth authentication, you can configure the token refresh endpoint, OAuth scopes, token expiry property name, token expire property date format, and access token property name [source](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#oauth). But it doesn't seem to cover the specific use case you mentioned. If the Connector Builder UI doesn't support your specific authentication requirements, you might consider using the [low-code CDK](https://docs.airbyte.com/connector-development/config-based/low-code-cdk-overview) or [Python CDK](https://docs.airbyte.com/connector-development/cdk-python/) to implement your connector with custom authentication methods. For more information on authentication methods supported by the Connector Builder UI, you can refer to this [documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication).
m
@kapa.ai is there any plan to implement this? It seems like a fairly simple code change and UI change to support this
k
A message from kapa.ai
New message text here
j
Hey, thanks for reaching out
This is not supported at the moment, but we have plans to implement this kind of authentication schemes
You can follow along in the issue, one sec
the generalized session authenticator is pretty open in how it works - it allows to specify what request to make (which url, headers, body and so on), how to extract a token from the response and how to use this token in the requests for getting the actual data which seems to map perfectly to your use case
the password flow would work with this as well
m
Thanks for your reply Joe. So I fully understand, are you saying the no-code UI tool would not be a viable solution and need to look into a low-code CDK ?
j
not quite, we also plan to add this to the builder: https://github.com/airbytehq/airbyte/issues/26901 This is just an artifact of how the architecture looks like - the builder is using the low code CDK under the hood
If you configure a connector in the builder, it's basically just writing the low code manifest for you
So to enable this functionality, we first need to add the feature to the low code CDK, then we can expose it in the builder UI
The low code CDK can do a few things not exposed in the UI, but not too many - for your use case you need to wait until this is implemented (we plan to work on it in the near future, but I can't give you a release date yet)
If you want to get this done now, you would need to get into the Python CDK which allows maximum flexibility, but is much harder to work with
The only other workaround I can see is to create the access token via curl outside of Airbyte, then use the bearer authentication type with the access token in the connector directly
Based on the docs, the access tokens are valid for two days, so you would need to manually update it every two days to keep it working
To be clear, this would be a stopgap measure to allow you to work with the API today until there is a better way to support this
m
Thanks for your clarification thanku. It makes it much clearer in terms of the options we have. I’ll follow the github issue for the time being