Hi Shib, As I can see the way you're sending the consumer_key and consumer_secret is wrong.
It should be in the *Authorization* header in the following form. *key* = Base64 encoded consumer_key:consumer_secret and the *Authorization *header value should look like this. *Authorization: Basic key* ** Best Regards, On Sun, Jun 10, 2018 at 12:33 PM, shibsankar <[email protected]> wrote: > Yes. I see consumer key and consumer secret now when I click generate key > (*screenshot > key-value attached*) > > However, when I call token API with these key and secrets from Postman, I > don't receive any OAuth 2 token. (*screenshot access-token attached*) > > What is going wrong ? > > Regards > Shib > > > > On Sun, Jun 10, 2018 at 11:53 AM, Harsha Kumara <[email protected]> wrote: > >> >> >> On Sun, Jun 10, 2018 at 11:16 AM shibsankar <[email protected]> wrote: >> >>> I checked [1] https://docs.wso2.com/display/AM210/Subscribe+to+an+API >>> , yes, It gives a token for sure when you subscribe API. >>> >>> But is it an Oauth2 token? Or just a normal access token? >>> >> API Manager is compliant with OAuth2 specification. Hence the tokens you >>> obtained will use OAuth2. When you click generate keys button, you will >>> receive a consumer key and secret. >>> *Please see the screenshot attached.* >>> >>> Regards >>> Shib >>> >>> >>> >>> On Sun, Jun 10, 2018 at 9:47 AM, Pubudu Gunatilaka <[email protected]> >>> wrote: >>> >>>> Hi Shib, >>>> >>>> You can refer [1] for getting the token. This explains how to get the >>>> Oauth2 token. >>>> >>>> You do not need to have WSO2 Identity Server for getting an Oauth2 >>>> token. It is coming with API Manager. >>>> >>>> Using the token API [2], you can get a token. >>>> >>>> [1] - https://docs.wso2.com/display/AM210/Subscribe+to+an+API >>>> [2] - https://docs.wso2.com/display/AM210/Token+API >>>> >>>> Thank you! >>>> >>>> On Sat, Jun 9, 2018 at 9:07 PM shibsankar <[email protected]> wrote: >>>> >>>>> Hi, >>>>> I would like to do the following : >>>>> >>>>> >>>>> *My Objective *: >>>>> >>>>> I have published my API in WSO2 API Gateway. API is working fine. >>>>> >>>>> Now I would like to secure my API with OAuth 2.0. I plan to invoke the >>>>> published API with OAuth 2.0 token from my Angular front-end application. >>>>> >>>>> >>>>> *My Query *: >>>>> How do I get the OAuth 2.0 token? >>>>> >>>>> *Q1*: Do I need to install WSO2 Identity server to get OAuth 2.0 >>>>> token? *Or *I can get OAuth token from WSO2 API Manager itself? >>>>> >>>>> *Q2*: Is there any WSO2 OAuth 2.0 API which provides OAuth token when >>>>> invoked? whats the URL? >>>>> >>>>> Regards >>>>> Shib >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>> >>>> >>>> -- >>>> *Pubudu Gunatilaka* >>>> Committer and PMC Member - Apache Stratos >>>> Senior Software Engineer >>>> WSO2, Inc.: http://wso2.com >>>> mobile : +94774078049 >>>> >>>> >>> >> >> -- >> Harsha Kumara >> Associate Technical Lead, WSO2 Inc. >> Mobile: +94775505618 >> Blog:harshcreationz.blogspot.com >> > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Janak Amarasena* Software Engineer Email: [email protected] Mobile: +94777764144 Web: https://wso2.com <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
