0
votes

I have integrated WSO2 (IS-KM-5.6.0) with APIM 2.5.0.

I am using below command to generate access token with default scope

curl -u : -k -d "grant_type=password&[email protected]@carbon.super&password=password" -H "Content-Type:application/x-www-form-urlencoded" https://localhost:9445/oauth2/token

it gives me proper access token with scope as default. Below is the result of the above command:

{"access_token":"5218d614-e327-379f-819a-b9572daa106d","refresh_token":"4ed7484d-ca30-31c1-8bce-e778f4aab6fd","scope":"default","token_type":"Bearer","expires_in":2568}

But, I am unable to use this in invoking the rest APIs of APIM (publisher rest APIs) to perform below activities: a) getting store application details b) adding applications etc etc

I read in WSO2 documents that to use the store and publisher restAPIs, only scopes which are available for APIM store and publisher can only be used.

So,Can these store or publisher restAPIs be invoked without scopes (apim:subscribe) or is there any other way to do so?

Any help?

Thanks

1

1 Answers

0
votes

The store or publisher restAPIs can't be invoked without scopes. For publisher & store there are separate scope. Scope for store & for creating application is same apim:subscribe. Scope for publisher related apis is apim:api_view. You can get api specific scopes from store & publisher api documentation. FYI you can specify multiple scopes in one shot as well.