Skip to content

Retrieve an application token

Request

OAuth 2.0 scope:
  • okta.apps.read

Retrieves a refresh token for the specified app

Path
appIdstringrequired

Application ID

Example:0oafxqCAJWWGELFTYASJ
tokenIdstringrequired

id of Token

Example:sHHSth53yJAyNSTQKDJZ
Query
expandstring

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

Example:expand=scope
curl -i -X GET \
  'https://subdomain.okta.com/api/v1/apps/0oafxqCAJWWGELFTYASJ/tokens/sHHSth53yJAyNSTQKDJZ?expand=scope'

Responses

Success

Bodyapplication/json
clientIdstring

Client ID

createdstring, (date-time)(createdProperty)read-only

Timestamp when the object was created

Example:"2017-03-28T01:11:10.000Z"
expiresAtstring, (date-time)read-only

Expiration time of the OAuth 2.0 Token

idstringread-only

ID of the Token object

Example:"oar579Mcp7OUsNTlo0g3"
issuerstring

The complete URL of the authorization server that issued the Token

Example:"https://{yourOktaDomain}/oauth2/ausain6z9zIedDCxB0h7"
lastUpdatedstring, (date-time)(lastUpdatedProperty)read-only

Timestamp when the object was last updated

scopesArray of strings

The scope names attached to the Token

Example:
[ "offline_access" ]
statusstring(GrantOrTokenStatus)read-only

Status

Enum:"ACTIVE""REVOKED"
Example:"ACTIVE"
userIdstring

The ID of the user associated with the Token

Example:"00u5t60iloOHN9pBi0h7"
_embeddedobjectread-only

The embedded resources related to the object if the expand query parameter is specified

Response
{ "id": "oar579Mcp7OUsNTlo0g3", "status": "ACTIVE", "created": "2023-03-09T03:18:06.000Z", "lastUpdated": "2023-03-09T03:18:06.000Z", "expiresAt": "2023-03-16T03:18:06.000Z", "issuer": "https://{yourOktaDomain}/oauth2/ausain6z9zIedDCxB0h7", "clientId": "0oabskvc6442nkvQO0h7", "userId": "00u5t60iloOHN9pBi0h7", "scopes": [ "offline_access", "car:drive" ], "_embedded": { "scopes": [ … ] }, "_links": { "app": { … }, "self": { … }, "revoke": { … }, "client": { … }, "user": { … }, "authorizationServer": { … } } }