Gasper K.
09/26/2024, 7:33 AMuser
09/26/2024, 7:34 AMApiKeyAuthenticator
or BearerAuthenticator
objects, which allow you to specify the API key or bearer token to be injected into the request header for authentication. However, if you need to inject two parameters into the header for authentication (like api-key
and guid
), this is not directly supported in the current implementation of the Connector Builder. Here's an example of how the ApiKeyAuthenticator
is used to inject a single parameter into the header: json { "inject_into": "header", "field_name": "Authorization" }
In this case, the inject_into
field is set to header
and the field_name
is set to Authorization
. The actual API key is set via the api_token
property: json { "api_token": "{{ config['api_key'] }}" }
If you need to inject two parameters into the header for authentication, you might need to use the Python CDK or modify the connector code manually to support this use case. For more information, you can refer to the [Connector Builder documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#api-key) and the [Config-based YAML Reference](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ApiKeyAuthenticator).Gasper K.
09/26/2024, 7:50 AMuser
09/26/2024, 7:50 AMuser
09/26/2024, 7:51 AMApiKeyAuthenticator
with additional parameters in the YAML file. The ApiKeyAuthenticator
is designed to handle a single API key for authentication, which is injected into the HTTP request header. Here's an example of how the ApiKeyAuthenticator
is used: json authenticator: type: "ApiKeyAuthenticator" header: "Authorization" api_token: "Bearer hello"
In this case, the header
field is set to Authorization
and the api_token
field is set to Bearer hello
. The api_token
field is where you would typically insert your API key. If you need to use multiple parameters for authentication, you might need to use a different authenticator or modify the connector code manually to support this use case. For more information, you can refer to the [Connector Builder documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#api-key) and the [Config-based YAML Reference](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ApiKeyAuthenticator).