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

# Refresh Token

> Get a new access token using refresh token

Access tokens expire periodically. Use this endpoint to get a new access token without re-authenticating.

## Request Body

<ParamField body="refresh_token" type="string" required>
  The refresh token received during login
</ParamField>

## Response

<ResponseField name="access_token" type="string">
  New JWT access token
</ResponseField>

<ResponseField name="token_type" type="string">
  Always "bearer"
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.finscreener.in/api/auth/refresh-token \
    -H "Content-Type: application/json" \
    -d '{"refresh_token": "your_refresh_token"}'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.finscreener.in/api/auth/refresh-token",
      json={"refresh_token": refresh_token}
  )
  new_token = response.json()["access_token"]
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "token_type": "bearer"
  }
  ```

  ```json Error theme={null}
  {
    "detail": "Invalid refresh token"
  }
  ```
</ResponseExample>
