Application Tokens

Resource to manage OAuth 2.0 tokens for an app

Note: To configure refresh tokens for an app, see grant_types and refresh_token.

List all application refresh tokens
OAuth 2.0: okta.apps.read

Lists all refresh tokens for an app

Note: The results are paginated according to the limit parameter. If there are multiple pages of results, the Link header contains a next link that you need to use as an opaque value (follow it, don't parse it).

Request
path Parameters
appId
required
string

Application ID

Example: 0oafxqCAJWWGELFTYASJ
query Parameters
expand
string

An optional parameter to return scope details in the _embedded property. Valid value: scope

Example: expand=scope
after
string

Specifies the pagination cursor for the next page of results. Treat this as an opaque value obtained through the next link relationship. See Pagination.

Example: after=16275000448691
limit
integer [ 1 .. 200 ]
Default: 20

A limit on the number of objects to return

Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/apps/{appId}/tokens
Request samples
Response samples
application/json
[]

Revoke all application tokens
OAuth 2.0: okta.apps.manage

Revokes all OAuth 2.0 refresh tokens for the specified app. Any access tokens issued with these refresh tokens are also revoked, but access tokens issued without a refresh token aren't affected.

Request
path Parameters
appId
required
string

Application ID

Example: 0oafxqCAJWWGELFTYASJ
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/apps/{appId}/tokens
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 application token
OAuth 2.0: okta.apps.read

Retrieves a refresh token for the specified app

Request
path Parameters
appId
required
string

Application ID

Example: 0oafxqCAJWWGELFTYASJ
tokenId
required
string

id of Token

Example: sHHSth53yJAyNSTQKDJZ
query Parameters
expand
string

An optional parameter to return scope details in the _embedded property. Valid value: scope

Example: expand=scope
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/apps/{appId}/tokens/{tokenId}
Request samples
Response samples
application/json
{}

Revoke an application token
OAuth 2.0: okta.apps.manage

Revokes the specified token for the specified app

Request
path Parameters
appId
required
string

Application ID

Example: 0oafxqCAJWWGELFTYASJ
tokenId
required
string

id of Token

Example: sHHSth53yJAyNSTQKDJZ
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/apps/{appId}/tokens/{tokenId}
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": [ ]
}