Get/refresh a token

Get a JWT token or refresh a new one.

Request

POST https://api.nexway.store/iam/tokens

Request body

The request body takes a complete TokenRequest resource, containing the following writable properties:

{
    "clientSecret": "string",
    "grantType": "string",
    "password": "string",
    "realmName": "string",
    "refreshToken": "string",
    "username": "string"
}

Properties

Name Type Description Additional
clientSecret string

client Secret

Optional
grantType string

client ID

Possible values are:

  • password
  • refresh_token
  • client_credentials
Optional
password string

password

Optional
realmName string

realm name

refreshToken string Optional
username string

Username

Optional

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

Success

AccessTokenResponse
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure

Example

{
    "clientSecret": "123-123-123-123",
    "grantType": "PASSWORD",
    "password": "XdefH!E",
    "realmName": "com2us",
    "username": "jdoe"
}

Explore this API

request

request

Request Content-Type
Response Content-Type
Try it out!