An API Access Token/Key is a string that is being passed as a HTTP header of an API request. WSO2 APIM provides OAuth2.0 bearer token based authentication for API access and the API key has to be submitted alongside the API request in order to authenticate the access.
When an Application Developer registers an Application in the Developer Portal, a consumer-key and consumer-secret pair is generated, which represents the credentials of the Application that is being registered. The consumer-key becomes the unique identifier of the Application, similar to a user's username, and is used to authenticate the application/user. When an API key or an API access token is issued for the Application, it is issued against the latter mentioned consumer-key. When sending an API request, the access token has to be passed as the Authorization HTTP header value.
Authorization: Bearer NtBQkXoKElu0H1a1fQ0DWfo6IX4a
Generate application keys¶
Follow the instructions below to generate/renew application keys:
Sign in to WSO2 API Developer Portal (
Click Applications to navigate to the applications listing page and click on the respective application for which you want to generate keys.
Click Production Keys and click Generate Keys to create an application access token.
The access token will be generated along with application consumer key and secret.
If the application type is JWT, a JWT access token is generated. Make sure to copy the JWT access token that appears so that you can use it in the future.
If the application type is OAuth, the generated access token will be an Opaque token.
After the keys are generated, you can find the consumer key and consumer secret pair via the application details page.
In the Access token validity period field, you can set an expiration period to determine the validity period of the token after generation. Set this to a negative value to ensure that the token never expires. For more information, see Changing the default token expiration time.
When you generate access tokens for APIs that are protected by scopes, you can select the respective scopes and thereafter, generate the token for it.