---
title: "Obtain Access Token"
method: POST
path: "/oauth/token"
tags: ["Bearer Authorization"]
---

# Obtain Access Token

`POST /oauth/token`

## Request

- Base URL: `https://api.1nce.com/management-api`
- URL: `https://api.1nce.com/management-api/oauth/token`
- Auth: HTTP basic

Obtain a token for accessing other 1NCE API resources by using a POST request with a valid username and password combination for a 1NCE user account that has the permission to use the API.

## Request body

- object
  - `grant_type` string, required: Grant Type of the requested access token. The default value is "client_credentials".

## Response `200`

OK

- BearerToken200: Response of querying the access token for the 1NCE API.
  - `status_code` 200: Response HTTP status code for the executed request towards the 1NCE API. Status 200 indicates a successful request and response.
  - `access_token` string: The generated Access Token for using as authentication token for other 1NCE API requests.
  - `token_type` string: The type of token returned. The 1NCE API used Bearer tokens for general authentication.
  - `expires_in` integer: Time in seconds until the returned 1NCE API Bearer Token is expired and a new token has to be queryied.
  - `userId` string: User ID type of the returned token.
  - `scope` string: Scope access level of the returned token.

## Other responses

- `400`: Bad Request
- `404`: Not Found

---

[API](https://skmtc.dev/1nce/apis/authorization.md) - [All operations](https://skmtc.dev/1nce/apis/authorization/llms.txt) - [OpenAPI document](https://skmtc.dev/1nce/apis/authorization/revisions/6251b029fb19?raw)
