---
title: "POST /auth/v2/token"
method: POST
path: "/auth/v2/token"
tags: ["Auth"]
---

# POST /auth/v2/token

`POST /auth/v2/token`

## Request

- Base URL: `https://auth.api.sui-staging.bluefin.io`
- URL: `https://auth.api.sui-staging.bluefin.io/auth/v2/token`
- Auth: none declared. Required headers: `payloadSignature`

login compatible with BCS payload with intent bytes

## Query parameters

- `refreshTokenValidForSeconds` integer
- `readOnly` boolean: If not supplied defaults to false

## Headers

- `payloadSignature` string, required

## Request body `*/*`

- LoginRequest: User is expected to sign this payload and sends is signature in login api as header and payload itself in request body
  - `accountAddress` string, required: The address of the account.
  - `signedAtMillis` integer, required: The timestamp in millis when the login was signed.
  - `audience` string, required: The intended audience of the login request.

## Response `200`

OK

- LoginResponse
  - `accessToken` string, required
  - `accessTokenValidForSeconds` integer, required
  - `refreshToken` string, required
  - `refreshTokenValidForSeconds` integer, required

## Other responses

- `400`: bad signature
- `401`: invalid signature
- `403`: invalid audience
- `500`: internal server error
- `default`: Unexpected error

---

[API](https://skmtc.dev/bluefin/apis/bluefin-auth-api.md) - [All operations](https://skmtc.dev/bluefin/apis/bluefin-auth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bluefin/apis/bluefin-auth-api/revisions/517ecf67949c?raw)
