> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate Authorization Flow

> Initiate account authorization via the Atoa Bank Feed API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Before retrieving transactions, your users must authorize access to their bank accounts.

<Note>
  When using a sandbox secret key, all bank feed endpoints return static data and do not reflect real-time transactions.
</Note>

### Authorization

Bearer `<token>`

**Request Body Schema**

<ParamField body="redirectUrl" type="string" required>
  The URL your users will be redirected to after completing the account
  authorization flow.
</ParamField>

<ParamField body="callbackParams" type="string">
  Custom parameters you wish to pass through the flow. These will be appended as
  query parameters to the redirectUrl once the user completes the account
  authorization process.
</ParamField>

**Response**

<ResponseField name="url" type="string">
  Use this to redirect your user to begin account authorization.
</ResponseField>

<ResponseField name="accountAuthId" type="string">
  A unique identifier for tracking the authorization session. This ID will be
  appended to the `redirectUrl` after the account authorization flow is
  completed.
</ResponseField>

<ResponseField name="expiresAt" type="string">
  If the link expires while in use, users will be redirected to the
  `redirectUrl`.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "url": "https://atoa-link.com/link-bank?accountAuthId=ed016c93...&expiresAt=2025-04-16T17:53:48.174Z&env=PRODUCTION",
    "accountAuthId": "ed016c93-68c2-4394-8e9c-1e700f8a1b15",
    "expiresAt": "2025-04-16T17:53:48.174Z"
  }
  ```

  ```json 401 theme={null}
  {
    "name": "UNAUTHORIZED",
    "message": "Unauthorized",
    "status": 401,
    "errors": "[]"
  }
  ```
</ResponseExample>
