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

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 apiTokenId

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
{}

Upsert an API token network condition
OAuth 2.0: okta.apiTokens.manage

Upserts an API Token Network Condition by apiTokenId

Request
path Parameters
apiTokenId
required
string

id of the API Token

Example: 00Tabcdefg1234567890
Request Body schema: application/json
required
name
string

The name associated with the API Token

object

The Network Condition of the API Token

connection
string

The connection type of the Network Condition

include
Array of strings

List of included IP network zones

exclude
Array of strings

List of excluded IP network zones

userId
string

The userId of the user who created the API Token

Responses
200

OK

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

put/api/v1/api-tokens/{apiTokenId}
Request samples
application/json
{
  • "name": "api_token_name",
  • "clientName": "client_name",
  • "userId": "00uabcdefg1234567890",
  • "network": {
    • "connection": "ANYWHERE"
    },
  • "created": "2021-11-09T20:38:10.000Z"
}
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": [ ]
}