<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Create an API Token
Administration
Okta Classic Engine
Okta Identity Engine
Overview
This article describes how to create an API token in Okta.
Applies To
  • Administration
  • API
Solution

NOTE: The video and instructions below show how to create an SSWS API token for authentication. However, Okta recommends using scoped OAuth 2.0 and OIDC access tokens to authenticate with Okta management APIs. OAuth 2.0 and OIDC access tokens provide fine-grain control over the bearer's actions on specific endpoints. Whenever possible, Okta recommends using OAuth 2.0 and OIDC access tokens, as detailed in the How to Integrate Postman with Okta and Implement OAuth for Okta documentation.

Watch the video or review the steps below to create an API token:

 

  1. Log in to the Okta Admin Console as an Admin with the permissions that the token should have.
    • NOTE: The API token will inherit the permissions of the Admin who creates it.
  2. Go to Security > API.
  3. Click Create Token.
  4. Enter a name for the token.
  5. Document the token value from the screen that appears.
    • NOTE: Document and store the API token value carefully. If unauthorized users access it, administrators cannot retrieve it later, presenting a security risk.
 
NOTE:
  • The Okta API cannot create new API tokens. This is a current product limitation.
  • Okta API tokens remain valid for 30 days and automatically renew every time an API request uses them. When a token remains inactive for more than 30 days, the system revokes it and prevents further use.
  • To revoke an API token in an automated way (for example, after 6 months), use the /api-tokens endpoint and pass the ID of the token as documented on the Revoke an API token Okta Developer page.

Related References

Loading
How to Create an API Token