---
title: "Authorize a User via API"
method: POST
path: "/v1/partner/identity/token"
tags: ["Authorization"]
---

# Authorize a User via API

`POST /v1/partner/identity/token`

> 📘
>
> You can place your application's `client_id` into the `username` field, and your `client_secret` into the `password` form field of the Authentication section of this documentation 👉.

Using the `session_token` obtained from `/v1/partner/identity/verification`, call Astra’s Partner Identity Token endpoint to Authorize the User via API.

The result of successfully calling this endpoint will result in the creation of an access_token and refresh_token.

> 🚧
>
> This resource requires the OAuth Client to be configured for Trusted Authentication.

> ❗️
>
> This resource is only available for eligible programs. Please reach out to your Astra Integration Specialist for more information.

## Request body

- object
  - `token` string, required — The `session_token` obtained from the `/v1/partner/identity/verification` call
  - `user_consent_captured` boolean, required — By setting `user_consent_captured` to true, you are confirming that the End-User has consented to [Astra’s Terms of Service](https://astrafi.com/terms/) and [Privacy Policy](https://astrafi.com/privacy/).
  - `expires_in` integer — The TTL of the `access_token` in seconds. Defaults to 7200 if not included. Valid values are between 300 and 86400 inclusive

## Response `200`

Successful response

- OauthSuccessResponse
  - `access_token` string, password — The access token for the User (used for any Bearer Auth resources)
  - `expires_in` integer — Seconds from the time of authorization that the `access_token` will expire
  - `refresh_token` string, password — The token that can be used to refresh authorization and retrieve a new `access_token`
  - `token_type` string — The type of token returned

---

[API](https://skmtc.net/astra/apis/astra-developer-api.md) · [All operations](https://skmtc.net/astra/apis/astra-developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astra/astra-developer-api/revisions/09f0430e5d33/schema)
