Generate API Token

Generate API Token
Generate API Token in Identity Broker

Generate API Token in Identity Broker

Request
URI
POST
https://{api_host}/acs/t/{tenant}/api-tokens
COPY
Path Parameters
string
tenant
Required

The VMware Identity Services tenant ID

tenant example
my-tenant

Request Body
APITokensRequestMedia of type(s) application/vnd.vmware.vidm.api-tokens.create.request+json
Optional

Show optional properties

{
    "token_display_name": "string",
    "api_token_ttl": 0,
    "access_token_ttl": 0
}
{
    "_links": {
        "self": {
            "href": "https://example.com/path-to-self"
        }
    },
    "token_display_name": "string",
    "api_token_ttl": 0,
    "access_token_ttl": 0,
    "max_count_of_uses": 0,
    "token_description": "string",
    "client_id": "string"
}
object
_links
Optional

The resource HATEOAS links. Usually includes a "self" link for this resource

string
token_display_name
Required
Constraints: minLength: 3 maxLength: 255

token_display_name

integer As int64 As int64
api_token_ttl
Required

API token ttl in minutes.

integer As int64 As int64
access_token_ttl
Required

Access token ttl in minutes.

integer As int32 As int32
max_count_of_uses
Optional

max_count_of_uses

Possible values are : 1, -1,
string
token_description
Optional
Constraints: minLength: 0 maxLength: 4000

token_description

string
client_id
Optional

client_id

Authentication
This operation uses the following authentication methods.
Responses
201

API Token was created successfully.

Returns APITokensResponseMedia of type(s) application/vnd.vmware.vidm.api-tokens.create.response+json
{
    "_links": {
        "self": {
            "href": "https://example.com/path-to-self"
        }
    },
    "id": "string",
    "client_display_name": "string",
    "client_id": "string",
    "client_type": "string",
    "token_display_name": "string",
    "token_type": "string",
    "token_sub_type": "string",
    "token_suffix": "string",
    "api_token_ttl": 0,
    "access_token_ttl": 0,
    "acct": "string",
    "user_status": false,
    "expiration_date": "string",
    "last_access_time": "string",
    "created_date": "string",
    "modified_date": "string",
    "token_status": "string",
    "token_description": "string",
    "token": "string"
}

400

The error can be any of those: the provided grant type is not supported, the request is missing a required parameterThe error description will contain 'error' and 'error_description' fields. See the API Token spec for further details.

Operation doesn't return any data structure

401

Auth token is missing or not valid

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/vnd.vmware.vidm.api-tokens.create.request+json' -d '{"access_token_ttl":"integer","api_token_ttl":"integer","token_display_name":"string"}' https://{api_host}/acs/t/{tenant}/api-tokens