> For the complete documentation index, see [llms.txt](https://docs.takionapi.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.takionapi.tech/cognito/api.md).

# Bypass Solution

### How the solution works <a href="#how-the-solution-works" id="how-the-solution-works"></a>

To bypass AWS Cognito:

1. Send our endpoint the website domain and email.
2. Parse the response and use it as `cognitoAsfData`.

### Endpoint <a href="#endpoint" id="endpoint"></a>

```
GET https://cognito.takionapi.tech/generate
```

## Generate cognitoAsfData

> Returns the \`cognitoAsfData\` token for the given site and username. Send your session's \`User-Agent\`, \`Sec-Ch-Ua\`, and \`Accept-Language\` headers for a more accurate token. Attach the returned token to your Cognito login request as \`cognitoAsfData\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Takion API — AWS Cognito","version":"1.0.0"},"servers":[{"url":"https://cognito.takionapi.tech"}],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"api_key"}},"schemas":{"GenerateResponse":{"type":"object","description":"The token payload. The endpoint page documents the token under `response`; the examples page reads it as `result` — confirm the exact key against the live service. Either way, the value is the `cognitoAsfData` token.\n","properties":{"response":{"type":"string","description":"The `cognitoAsfData` token to attach to your login request."}},"additionalProperties":true},"Error":{"type":"object","required":["error"],"description":"Every error is a JSON object with a single `error` string. Auth/quota problems return HTTP 401 and unexpected failures 500; input-validation errors are returned with this same shape — always check for `error`.\n","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Authentication or quota failure — HTTP 401 with an `error` message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Unexpected server error (HTTP 500).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/generate":{"get":{"operationId":"generateCognitoAsfData","summary":"Generate cognitoAsfData","description":"Returns the `cognitoAsfData` token for the given site and username. Send your session's `User-Agent`, `Sec-Ch-Ua`, and `Accept-Language` headers for a more accurate token. Attach the returned token to your Cognito login request as `cognitoAsfData`.\n","parameters":[{"name":"website","in":"query","required":true,"description":"The target website domain.","schema":{"type":"string"}},{"name":"username","in":"query","required":true,"description":"The username / email you are authenticating with.","schema":{"type":"string"}}],"responses":{"200":{"description":"The token payload. On a bad request an `error` field is returned instead — check for `error` first.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GenerateResponse"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
