<@U04S8PLJWMT> I need to login in the custom build...
# ask-ai
j
@kapa.ai I need to login in the custom builder by using Session Token Authenticator. How do I extract a token from the return headers after a POST?
k
I'm sorry, but according to the current Airbyte documentation and issue reports, the Session Token Authenticator in the Connector Builder does not support extracting a session token directly from the response headers after a POST request. The session token extraction is designed to work with JSON response bodies, where you specify a path to the token within the JSON structure. Attempts to reference headers or extract the token from non-JSON (e.g., plain text or headers) are not currently supported and will result in errors or key lookup failures. This limitation is confirmed by a [GitHub issue](https://github.com/airbytehq/airbyte/issues/43320) where users report being unable to extract tokens from headers or plain text bodies, and the session token path only works for JSON key-value pairs in the response body. If your API returns the token in the headers, you will not be able to extract it using the current Connector Builder UI's Session Token Authenticator. You may need to consider alternative approaches, such as requesting support for this feature or implementing a custom connector in code rather than using the UI builder at this time [Session Token Path cannot reference plain/text body response](https://github.com/airbytehq/airbyte/issues/43320).
j
How else can I POST a JSON body and extract a session token from the header?
@kapa.ai How else can I POST a JSON body and extract a session token from the header?
k
A message from kapa.ai
Based on the available Airbyte documentation and issue reports, the Connector Builder UI does not currently support extracting a session token from the response headers after a POST with a JSON body. The session token extraction is limited to JSON response bodies, and there is no documented way to extract tokens from headers using the UI or YAML configuration modes. This limitation is confirmed by user reports and open issues, such as [this GitHub issue](https://github.com/airbytehq/airbyte/issues/43320), where users are unable to access header values for authentication purposes. If you need to POST a JSON body and extract a session token from the response headers, the only documented alternative is to implement your connector using the [low-code/YAML mode](https://docs.airbyte.com/platform/connector-development/config-based/low-code-cdk-overview) or the [Python CDK](https://docs.airbyte.com/platform/connector-development/cdk-python/), where you have full control over the HTTP request and response handling, including access to headers. The Connector Builder UI does not currently provide this capability, and there is no workaround mentioned in the documentation or issues. In summary: - The Connector Builder UI does not support extracting tokens from headers. - Use the low-code/YAML mode or Python CDK for this use case, as recommended for custom authentication flows involving headers or more complex logic [Custom authentication methods](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/authentication#custom-authentication-methods).