> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zbdpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Access Token

> Fetch the user's access token from ZBD Login.

## Description

After accessing the ZBD login portal URL and successfully authenticating, the user will be redirected back to your application with `state` and `code` query parameters included. These two properties allow you to hit the `token` endpoint, and get the user's access token.

Once you have the `code` returned from the previous `authorization` endpoint, you must now make a `POST` request to get the token from this endpoint.

* [Read here for more details](/earn/oauth2) on how to setup ZBD Login (OAuth2) with your platform.

## Configuration

### Header Parameters

<ParamField initialValue="application/json" header="Content-Type" type="string">
  Content Type
</ParamField>

### Body

<ParamField required body="client_id" type="string" />

<ParamField required body="client_secret" type="string" />

<ParamField required body="grant_type" type="string" />

<ParamField required body="redirect_uri" type="string" />

<ParamField required body="code" type="string" />

<ParamField required body="code_verifier" type="string" />
