<@U04SE163WC8> in connection builder, how can i au...
# ask-ai
g
@kapa.ai in connection builder, how can i authenticate using two parameteres that should be injected in header api-key & guid? Default api-key auth assumes only one auth parameter.
u
The current authentication methods in Airbyte's Connector Builder support injecting a single parameter into the request header, such as an API key. This is done using the
ApiKeyAuthenticator
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:
Copy code
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:
Copy code
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).
g
@kapa.ai can i extend ApiKeyAuthenticator with additional parameters directly in YAML ?
u
A message from kapa.ai
u
Based on the provided knowledge sources, it doesn't appear that you can directly extend the
ApiKeyAuthenticator
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:
Copy code
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).