Follow the instructions given below to generate the OAuth 2.0 access token that you need to send via the REST client:
Obtain the client credentials using the dynamic-client-registration service.
- Encode the client credentials as follows:
- Access any base64 encoder.
Example: https://www.base64encode.org/ - Enter the OAuth2 Consumer Key and OAuth2 Consumer Secret in the following format in the encoder input section:
<CLIENT_ID>:<CLIENT_SECRET>
For example:
f8fc0aI14DPrQ_DwkpSau1LGdwAa:p8g_rFXtbPjl5pGMJe4bNd5fwSEa
- Click Encode to generate the encoded key.
The following is an example of an encoded key:
cDhnX3JGWHRiUGpsNXBHTUplNGJOZDVmd1NFYTpmOGZjMGFJMTREUHJRX0R3a3BTYXUxTEdkd0Fh
- Access any base64 encoder.
Generate the access token using the following command:
The above command generates an access token and a refresh token.
For more information on generating the access token and the refreshing the token at the time a token is renewed, see WSO2 APIM documentation on Token API.