0
votes

Here the article about how to generate user access token: http://charithaka.blogspot.ru/2013/07/oauth-20-grant-types-with-wso2-api_16.html

Now I have application token, user token generated like in this article and trying to invoke API method , configured in Api Manager UI to be accessed with user AND app authorization.

App authorization token goes in request as: header: Authorization Bearer But absolutely no info on where goes .. Tried in query string. Tried alone with api methods configured for access with only user authorization. Getting 401 error response from api manager..

https://lisp.cc/apimanager.jpg - screenshot where I found no docs how to grant access to api restricted by case 1 or 2 (marked red lines)

Any suggestions?

1

1 Answers

0
votes

I believe you have successfully published your API, and generated application accesstoken and user access token. You can use those tokens to send request to relevant APIs. For example, if you have an application token generated and if you want to access your API; you can use following curl command to execute your API;

curl -H "Authorization :Bearer APPLICATION_TOKEN" http://localhost:8280/testAPI/1.0.0

How you are invoking your API? what is your curl command? You can check the documentation for a sample