# Access Token

Exchange an API ID and API key for an OAuth2 bearer token.
- **Preconditions**
:
`client_id`
 is the API ID and
`client_secret`
 the API key. The member must be active, and the caller's IP must satisfy the Open API IP allow and deny lists.
- **Effect**
: none — the token is self-signed and nothing is stored server side.
- **Lifetime**
:
`expires_in`
 seconds, 3600 by default.
**There is no refresh token and no refresh endpoint**
; request a new token instead.
- **Concurrency**
: because tokens are stateless, issuing a new one does
**not**
 invalidate earlier tokens — several can be valid at once. A token stops working only when it expires or when the API key is rotated.
- **Retry**
: safe to retry.

Documented business errors: `12002`, `35002`, `35005`. See [Error Codes](/api-reference/getting-started/error-codes) for what each code means. Any operation can additionally return the common codes.

Endpoint: POST /oauth2/token
Version: 2026-09-05
Security: Authorization

## Header parameters:

  - `Content-Type` (string, required)

## Request fields (application/json):

  - `client_id` (string, required)
    A API ID identifies an member

  - `client_secret` (string, required)
    A API Key authenticates a client ID. To call MoreLogin APIs, you'll
exchange your API ID and API Key for an access token. Keep this
secret safe.

  - `grant_type` (string, required)
    Package name — required only if appVersionId is not provided
    Example: client_credentials

## Response 200:

  - `200` (unknown)
    Success. `data` is an object with the fields `scope`, `access_token`, `token_type`, `expires_in` and `client_metadata`.

## Response 200 fields (application/json):

  - `code` (integer, required)

  - `msg` (string | null, required)

  - `data` (object, required)

  - `data.scope` (string, required)

  - `data.access_token` (string, required)

  - `data.token_type` (string, required)

  - `data.expires_in` (integer, required)

  - `data.client_metadata` (object, required)

  - `data.client_metadata.name` (string, required)

  - `requestId` (string, required)

