Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization has been denied for this request when using postman #12

Open
mohammadamer opened this issue Jul 27, 2017 · 1 comment
Open

Comments

@mohammadamer
Copy link

Authorization has been denied for this request when using postman although i used bearer and the token as Authorization on the header so could any one help?

@davewyers
Copy link

Hi There,

Yes it took me a while to work it out but I got there in the end, here is how I did it.

In NOP Admin under API create a new client, the client ID & Secret will be created for you.
image

Note the Callback URL which is pointing to www.getpostman.com/oauth2/callback

Then in PostMan, create a new GET, for example http://localhost:15536/api/customers/count

Click on the Authorization tab, set Type to OAuth2.0, click on "Get New Access Token"

image

Token Name can be whatever you want as it is only for display but enter your server details for NOP, you will have a different port number to me. Then click "Request Token".

image

All going well you should have an access_token come back to you, in which case you then click on Use Token, check that the Add Token to option is set to "Header"

Now Click on "Send" & you should have the JSON returned displaying the count of customers.

All the best

iwhp pushed a commit to iwhp/nopCommerce-api-sampleapplication that referenced this issue Aug 22, 2018
iwhp pushed a commit to iwhp/nopCommerce-api-sampleapplication that referenced this issue Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants