- Administration
- API
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:
- 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.
- For example, if the token will be used for an API call that will add users to an Administrator role, the token must be created by a Super Administrator since only Super Admins can grant Admin permissions to other users.
- Refer to the Learn about administrators or Standard administrator roles and permissions documentation for more information.
- NOTE: The API token will inherit the permissions of the Admin who creates it.
- Go to Security > API.
- Click Create Token.
- Enter a name for the token.
- 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.
- 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-tokensendpoint and pass the ID of the token as documented on the Revoke an API token Okta Developer page.
