If you don't have an Okta organization, you can create a free Okta Developer Edition organization at this link.
Access the API page:
Click Create Token.
Name your token and click Create Token.
Make note of your API token, as you only see it one time.
Okta uses a bearer token for API authentication with a sliding scale expiration. Tokens are valid for 30 days and automatically refresh with each API call. Tokens that aren't used for 30 days expire. The token lifetime is currently fixed and can't be changed for your organization.
If a user account is deactivated in Okta, the API Token is deprovisioned at the same time.
API tokens inherit the API access of the user who creates them, so we recommend you create a "service account" user with only the permission levels that you need for the token to perform the API tasks that you require.