NiCE Token API
The Token API from NiCE — 1 operation(s) for token.
The Token API from NiCE — 1 operation(s) for token.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nice:nice-token-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Nice Token API
version: v1
description: 'Operations tagged Token across 2 of this provider''s published API definitions: nice-authentication-globalauthentication.json, nice-authentication-globalauthentication-openapi.yml. Each path carries the servers of the definition it was published in.'
tags:
- name: Token
paths:
/auth/token:
post:
tags:
- Token
summary: Retrieve tokens associated with authentication
description: 'This is a standard endpoint associated with
OpenID Connect and defined by the
OAuth 2 standard.
This is the *only* API that returns tokens.
There are five different uses of this API:
* \* The OpenID Connect authorization code flow. In this case the OIDC standard parameters are followed, including PKCE support.
This requires either client basic authentication, post authentication, or PKCE protection.
*
\* Authentication using Access Keys, which follows OAuth 2 resource owner password credentials grants.
This requires either client basic authentication or post authentication.
*
\* Token refresh, which follows OAuth 2 and OIDC standards.
This does not require client authentication.
*
\* Token exchange, used for delegation. This leverages RFC 8693 - OAuth 2.0 Token Exchange to exchange access tokens for different access tokens.
This requires that the client_id of the new token be passed in as a parameter.
*
\* Token exchange, used for impersonation. This leverages RFC 8693 - OAuth 2.0 Token Exchange to exchange access tokens for different access tokens.
This does not require client authentication.
The specific client authentication requirements are outlined above and are not consistent
across the different uses of the single endpoint. Note that post authentication is covered as no security
requirement since it does not leverage the Authentication header.
The size of the token returned from the token endpoint is not fixed and may vary depending on the number of roles and views assigned to the user. As the token size can dynamically change, we strongly recommend that consumer applications do not impose any restrictions on token size. This ensures proper handling of the token, regardless of its size.
Note that with the support of PKCE protection that all of these flows *except* Access Keys
allows client-based authentication (meaning directly from a single-page application, for
example). This is by design, and the reason for the exception for token refresh calls.
Access keys are specifically designed for back-end integrations and so the limitation
should not be impactful.
>**NOTE that RFC 6749 (OAuth 2 Authorization) section 2.3.1 specifies that the client_id and client_password
> are URL-encoded before concatenation with ":" and being base 64 encoded. This is not the typical use of
> Basic authentication and so it is called out here to avoid confusion.**'
operationId: getToken
security:
- {}
- tokenAuth: []
requestBody:
description: This form contains the values corresponding to to the flow being requested.
content:
application/x-www-form-urlencoded:
schema:
oneOf:
- $ref: '#/components/schemas/tokenAuthcodeRequest'
- $ref: '#/components/schemas/tokenAccessKeyRequest'
- $ref: '#/components/schemas/tokenRefreshRequest'
- $ref: '#/components/schemas/tokenExchangeRequest'
- $ref: '#/components/schemas/tokenImpersonationExchangeRequest'
examples:
OIDC-basic:
summary: Authorization code flow, basic authentication.
value:
grant_type: authorization_code
code: SplxlOBeZQQYbYS6WxSbIA
redirect_uri: https%3A%2F%2Fclient.example.org%2Fcb
OIDC-post:
summary: Authorization code flow, post authentication.
value:
client_id: s6BhdRkqt3
client_secret: ikaudfUkdaWQ
grant_type: authorization_code
code: SplxlOBeZQQYbYS6WxSbIA
redirect_uri: https%3A%2F%2Fclient.example.org%2Fcb
OIDC-pkce:
summary: Authorization code flow, PKCE validation.
value:
client_id: s6BhdRkqt3
grant_type: authorization_code
code: SplxlOBeZQQYbYS6WxSbIA
redirect_uri: https%3A%2F%2Fclient.example.org%2Fcb
code_verifier: HereIsAnExampleStringNotVeryRandom
OIDC-refresh:
summary: Refresh token request.
value:
client_id: s6BhdRkqt3
grant_type: refresh_token
refresh_token: iudnvUkjdfSS7Af67
AccessKey-basic:
summary: Access key token request, basic authentication.
value:
grant_type: password
username: AJ26OWRCU6OR4MS2KQMV4GSDLCMDM5M7XN3XYXD7KXDFIFT6FFXA%3D%3D%3D%3D
password: C5UJHWRFOPDPWV7ZJQAZQRS5NJFIQLC5VD2SK6GKD6PHKI7OC6ZQ%3D%3D%3D%3D
AccessKey-post:
summary: Access key token request, post authentication.
value:
client_id: s6BhdRkqt3
client_secret: ikaudfUkdaWQ
grant_type: password
username: AJ26OWRCU6OR4MS2KQMV4GSDLCMDM5M7XN3XYXD7KXDFIFT6FFXA%3D%3D%3D%3D
password: C5UJHWRFOPDPWV7ZJQAZQRS5NJFIQLC5VD2SK6GKD6PHKI7OC6ZQ%3D%3D%3D%3D
OIDC-token-exchange:
summary: Token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:token-exchange
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
OIDC-associated-user-token-exchange:
summary: Associated user token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:associated-user-token-exchange
audience: ed475d72-2eb4-40e8-9577-72fec1e3cc0e
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
OIDC-role-impersonation-token-exchange:
summary: Role impersonation token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:role-impersonation-token-exchange
audience: 04a286fa-fe6a-4552-8eb5-439976ac1ab8
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
OIDC-user-impersonation-token-exchange:
summary: User impersonation token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:user-impersonation-token-exchange
audience: e6cdf24b-49df-4e6d-ae63-8a8a0af6b609
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
OIDC-impersonate-support-token-exchange:
summary: Legacy impersonate and support impersonation token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:impersonate-support-token-exchange
audience: d5b1b429-38e5-4751-bef0-386633aab628
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
OIDC-impersonate-configure-token-exchange:
summary: Legacy impersonate and configure impersonation token exchange request.
value:
grant_type: urn:ietf:params:oauth:grant-type:impersonate-configure-token-exchange
audience: 4c37fd56-7884-4310-8e8f-4078b3276ba3
subject_token: iudnvUkjdfSS7Af67
subject_token_type: urn:ietf:params:oauth:token-type:access_token
responses:
'200':
description: Success
headers:
Cache-Control:
description: Header required by OpenID Connect specification.
required: true
schema:
type: string
example: no-store
enum:
- no-store
Pragma:
description: Header required by OpenID Connect specification.
required: true
schema:
type: string
example: no-cache
enum:
- no-cache
content:
application/json:
schema:
title: Token Response
type: object
required:
- access_token
- token_type
- refresh_token
- expires_in
- id_token
properties:
access_token:
type: string
description: The access token granted.
token_type:
type: string
description: The type of the access token.
example: Bearer
issued_token_type:
type: string
description: The type of token returned, required by RFC 8693 section 2.2.1.
example: urn:ietf:params:oauth:token-type:access_token
refresh_token:
type: string
description: The refresh token granted.
expires_in:
type: integer
description: The number of seconds until the tokens expire.
example: 3600
id_token:
type: string
format: jwt
description: The identity token granted.
'400':
description: Failure
headers:
Cache-Control:
description: Header required by OpenID Connect specification.
required: true
schema:
type: string
example: no-store
enum:
- no-store
Pragma:
description: Header required by OpenID Connect specification.
required: true
schema:
type: string
example: no-cache
enum:
- no-cache
content:
application/json:
schema:
title: Token Error Response
type: object
required:
- error
properties:
error:
type: string
description: An error string, defined as part of the [OAuth 2 specification](https://www.rfc-editor.org/rfc/rfc6749.txt), section 5.2.
enum:
- invalid_request
- invalid_client
- invalid_grant
- unauthorized_client
- unsupported_grant_type
- invalid_scope
error_description:
type: string
description: An optional error description.
components:
schemas:
tokenImpersonationExchangeRequest:
type: object
required:
- grant_type
- audience
- subject_token
- subject_token_type
properties:
grant_type:
type: string
enum:
- urn:ietf:params:oauth:grant-type:associated-user-token-exchange
- urn:ietf:params:oauth:grant-type:role-impersonation-token-exchange
- urn:ietf:params:oauth:grant-type:user-impersonation-token-exchange
- urn:ietf:params:oauth:grant-type:impersonate-configure-token-exchange
- urn:ietf:params:oauth:grant-type:impersonate-support-token-exchange
audience:
type: string
description: The audience - id related to entity to impersonate.
subject_token:
type: string
description: The access_token.
subject_token_type:
type: string
enum:
- access_token
tokenAccessKeyRequest:
type: object
required:
- grant_type
- username
- password
properties:
client_id:
type: string
description: The client_id, required for `client_secret_post` method.
client_secret:
type: string
description: The client_secret, required for `client_secret_post` method.
grant_type:
type: string
enum:
- password
username:
type: string
description: Contains the public information of the access key.
password:
type: string
description: Contains the private information of the access key.
tokenAuthcodeRequest:
type: object
required:
- grant_type
- code
- redirect_uri
properties:
client_id:
type: string
description: The client identifier, required for `client_secret_post` method.
client_secret:
type: string
description: The client secret, required for `client_secret_post` method.
grant_type:
type: string
description: The type of grant.
enum:
- authorization_code
code:
type: string
description: The code returned to the caller.
redirect_uri:
type: string
description: The redirect_uri used in the request.
code_verifier:
type: string
description: A PKCE code verifier defined in section 4.6 of the [PKCE standard](https://tools.ietf.org/html/rfc7636).
tokenRefreshRequest:
type: object
required:
- client_id
- grant_type
- refresh_token
properties:
client_id:
type: string
description: The client_id.
grant_type:
type: string
enum:
- refresh_token
refresh_token:
type: string
tokenExchangeRequest:
type: object
required:
- grant_type
- subject_token
- subject_token_type
properties:
grant_type:
type: string
enum:
- token-exchange
subject_token:
type: string
description: The access_token.
subject_token_type:
type: string
enum:
- access_token
securitySchemes:
tokenAuth:
type: http
scheme: basic
userAuth:
type: http
scheme: bearer
bearerFormat: JWT
x-refined-from:
- nice-authentication-globalauthentication.json
- nice-authentication-globalauthentication-openapi.yml