API Tokens

The API Tokens API provides operations to manage SSWS API tokens for your organization.

List all API Token Metadata
OAuth 2.0: okta.apiTokens.read

Lists all the metadata of the active API tokens

Request
query Parameters
after
string

The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination for more information.

limit
integer [ 1 .. 200 ]
Default: 20

A limit on the number of objects to return

q
string

Finds a token that matches the name or clientName.

Responses
200

OK

403

Forbidden

429

Too Many Requests

get/api/v1/api-tokens
Request samples
Response samples
application/json
[]

Revoke the Current API Token

Revokes the API token provided in the Authorization header

Responses
204

No Content

403

Forbidden

429

Too Many Requests

delete/api/v1/api-tokens/current
Request samples
Response samples
application/json
{
  • "errorCode": "E0000006",
  • "errorSummary": "You do not have permission to perform the requested action",
  • "errorLink": "E0000006",
  • "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
  • "errorCauses": [ ]
}

Retrieve an API Token's Metadata
OAuth 2.0: okta.apiTokens.read

Retrieves the metadata for an active API token by id

Request
path Parameters
apiTokenId
required
string

id of the API Token

Example: 00Tabcdefg1234567890
Responses
200

OK

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/api-tokens/{apiTokenId}
Request samples
Response samples
application/json
{}

Revoke an API Token
OAuth 2.0: okta.apiTokens.manage

Revokes an API token by apiTokenId

Request
path Parameters
apiTokenId
required
string

id of the API Token

Example: 00Tabcdefg1234567890
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/api-tokens/{apiTokenId}
Request samples
Response samples
application/json
{
  • "errorCode": "E0000006",
  • "errorSummary": "You do not have permission to perform the requested action",
  • "errorLink": "E0000006",
  • "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
  • "errorCauses": [ ]
}