Hari Haran R
07/07/2025, 5:41 AMkapa.ai
07/07/2025, 5:42 AMPOST. - Authentication Method: Set to No Auth (since credentials are in the body). - Request Body: Use JSON key-value pairs: - Key: username, Value: {{ config['username'] }} - Key: password, Value: {{ config['password'] }} - Session Token Path: Set this to the path in the response where the session token or cookie value is found. - Expiration Duration: Set to the expected duration of the session. > For APIs like Metabase, this approach is documented and works for session tokens. If your API returns a cookie, you may need to extract the cookie value from the response and use it in subsequent requests. However, the Connector Builder does not natively handle cookies as authentication tokens; for more advanced cookie management, see the next option [Session Token Auth Configuration](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/authentication#configuration). ### 2. Using the Python CDK (Advanced, for Cookie Management) If you need to handle cookies directly (e.g., the API returns a Set-Cookie header and expects the cookie in subsequent requests), you should implement a custom authenticator in Python using the Airbyte CDK. Here’s an example approach: python class CookieAuthenticator(HttpAuthenticator): def __init__(self, config): self.cookie_jar = self.login(config["username"], config["password"]) def login(self, username, password): login_body = { "username": username, "password": password } login_url = urljoin(self.url_base, "login") resp = requests.post(url=login_url, json=login_body) resp.raise_for_status() return resp.cookies def get_auth_header(self) -> Mapping[str, Any]: return {"cookie": "; ".join([f"{k}={v}" for k, v in requests.utils.dict_from_cookiejar(self.cookie_jar).items()])} You would then pass this authenticator to your custom stream. This approach allows you to fully manage cookies as required by your API [Forum: Cookie-based authentication with Airbyte](https://discuss.airbyte.io/t/549). --- Summary: - Use the Connector Builder for simple session token flows where credentials are sent in the body. - Use the Python CDK for advanced cookie management, where you need to handle Set-Cookie and send cookies in subsequent requests. If you need more advanced cookie handling than the Connector Builder supports, the Python CDK is the recommended approach.Hari Haran R
07/07/2025, 5:54 AMkapa.ai
07/07/2025, 5:54 AMkapa.ai
07/07/2025, 5:54 AMPOST. - Authentication Method: Set to No Auth (since you are sending credentials in the body, not as headers). - Request Body: Choose JSON (key-value pairs) and add: - Key: username, Value: {{ config['username'] }} - Key: password, Value: {{ config['password'] }} This setup will send a POST request with a JSON body containing the username and password when retrieving the session token. You can then configure how to extract the session token from the response and use it for subsequent requests. For a detailed example (using Metabase as a reference), see the documentation: - [Session Token Auth Configuration](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/authentication#configuration) This approach is supported in the low-code connector builder and is the recommended way to send credentials in the request body as JSON.