---
title: "GenerateToken retrieves a token"
method: GET
path: "/token:generate"
---

# GenerateToken retrieves a token

`GET /token:generate`

Retrieves an access token for the authorized user.
If no access token is available, complete the "Authorization Code Flow" beginning w/ GenerateAuthorizationUrl

## Query parameters

- `applicationName` string, required

## Headers

- `VND.com.blackrock.Request-ID` string, UUID, required
- `VND.com.blackrock.Origin-Timestamp` string, date-time, required

## Response `200`

A successful response.

- V1Token — Token represents the credentials used to authorize the requests to access protected resources on the OAuth 2.0 provider's backend.
  - `applicationName` string — application_name is the full name of the authorizing application
  - `accessToken` string — An access token is a string used when making authenticated requests to an API. It represents that the user has authorized a third-party application access to their account
  - `refreshToken` string — Refresh tokens are used to request a new access token from an authorization server - in this case a new access token will be retrieved from Okta on behalf of the user
  - `tokenType` string — token_type is the type of token. The Type method returns either this or "Bearer", the default.

## Other responses

- `400` — Aladdin® will not process the request due to an apparent client error.
- `401` — Aladdin® will not process the request as the necessary credentials were not provided or were invalid.
- `403` — Aladdin® understood the request but is refusing to authorize it.
- `404` — Aladdin® did not find the resource requested or is unwilling to disclose if it exists. Could indicate a defect in the client program or data which is no longer accessible.

## Changes

> 2 revisions in range; 1 could not be searched.

- **2024-01-27** (v1) `3d3b851eb35a` — 4 info
  - the security scope `platform.infrastructure.token.v1.Token` was added to the endpoint's security scheme `OAuth2AccessCode`
  - the security scope `platform.infrastructure.token.v1.Token` was added to the endpoint's security scheme `OAuth2ClientCredentials`
  - the security scope `platform.infrastructure.token.v1.Token:read` was removed from the endpoint's security scheme `OAuth2AccessCode`
  - the security scope `platform.infrastructure.token.v1.Token:read` was removed from the endpoint's security scheme `OAuth2ClientCredentials`

[Change history](https://skmtc.dev/blackrock/apis/token/changes/token:generate/get.md)

---

[API](https://skmtc.dev/blackrock/apis/token.md) · [All operations](https://skmtc.dev/blackrock/apis/token/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blackrock/token/revisions/31b70af987e8/schema)
