Edit Page

Overiew

This endpoint is a Deprecated feature. Please see Getting an API Token.

Create tokens

POST /tokens

Create a token. This API does not require any token-based authentication to access.

Request Example

curl -v -H "Content-type:application/json" \
-H "Accept:application/json" \
-X POST https://{yourOktaDomain}.com/api/v1/tokens/ \
-d \
'{
  "username": "user8u3VOJBREVQHBTAS@asdf.com",
  "password": "SecretPass",
  "clientAppId": "capalkhfadflkjh",
  "deviceName": "Sample Device Name"
}'

Response Example

{
  "token": "00F-MBcxD2SC8tzXDCDZm2a04qtXLcFqtlrrPu6eVtxRs"
}

Revoke tokens

DELETE /tokens

Revokes the token that is being used to authenticate to the API.

Request Example

curl -v -H "Content-type:application/json" \
-H "Authorization:SSWS 00F-MBcxD2SC8tzXDCDZm2a04qtXLcFqtlrrPu6eVtxRs" \
-H "Accept:application/json" \
-X DELETE https://{yourOktaDomain}.com/api/v1/tokens/