0
votes

I am trying to understand on how to implement access token request from WSO2 API Manager. Given I have a login page with username and password input, how do I request the access token by using only these two parameters?

Because by referring to the Token API, consumer key / secret is required to be appended on the authorization header, which is not available during the login.

Thanks.

2

2 Answers

1
votes

To get an access token you should first register an oauth application for it. The client id, client secret are from the application. After that you can generate an access token from that application.

Follow these instructions to generate client id and client secret.

  1. Login to the APIM Store. (https://localhost:9443/store)

  2. Subscribe an Application for your api.

  3. Go to the application and click on Generate Keys in the production tab.

Now the client id and client secret will be created for your application. You can use those keys to generate the access token.

Edit:

Generate Client Id and Client Secret from rest api.

Please follow : https://docs.wso2.com/display/AM210/apidocs/publisher/index.html#guide

0
votes

In order to generate an access token, you need to have an Oauth2 application. Token comes under a particular Oauth2 application. That is why you need to have a consumer key and secret of the application.

You can use password grant type as in https://docs.wso2.com/display/AM210/Password+Grant