---
title: "Generate User Token"
method: GET
path: "/v2/coe/authentication"
---

# Generate User Token

`GET /v2/coe/authentication`

Generates a user token that must be passed to the IAB native SDK. Note: This API is only needed for Native SDK integration, not for H5/Web integration.

## Headers

- `client-id` string, required
- `pass-key` string, required
- `x-onboarding-partner` string, required
- `x-partner-user-id` string, required
- `x-partner-user-id-type` string, required

## Response `200`

Successful user token generation

- object
  - `success` boolean — Status of the API call
  - `data` object — Metadata of the API call
    - `token` string — IAB user token for the specified flow and user
    - `expiry_seconds` string — Time period in seconds for which the generated token will be valid
    - `expires_at` string — End time value in epoch timestamp for which the generated token will be valid

## Other responses

- `400` — Bad Request - Missing or improperly formatted parameters
- `401` — Unauthorized - Invalid client credentials
- `500` — Internal Server Error

---

[API](https://skmtc.net/midtrans/apis/snap-api.md) · [All operations](https://skmtc.net/midtrans/apis/snap-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/midtrans/snap-api/versions/67e029cf926a/schema)
