I am trying to consume API PLUGIN in one of my projects. Before moving forward, I want to test the API in Postman (A rest web service client). For this, I need a URL which I have to provide in Postman. Where do I get the URL of the API?
I already installed the API on one of my test deployment and its client is working fine and fetching the list of all customers.
Now the question is how I can test it in Postman? Which URL I have to provide to get the AccessToken and then the list of customers.
Since you are using Postman you can get the token and use it for all requests by following these steps: 1. From the Authorization tab in Postman select OAuth 2.0 and click Get New Access Token 2. Auth URL: {Your store URL}/OAuth/Authorize 3. Access Token URL: {Your store URL}/api/token 4. Insert the Client ID and Client secret from the API Plugin. 5. Copy the Callback URL from the popup and paste it in the API Plugin and save the API plugin settings. 6. Click Request Token.
Once you have retrieved the token before making a new request select the token from the Authorization tab.
Thanks Stoyan. The access token is fine now. I am able to retrieve it in Postman.
Now when I try http://localhost/api/products by selecting the received token, it says "Authorization has been denied for this request." Is there anything else I am missing?
{ "Message": "Authorization has been denied for this request." }
How to Get Access Token using Nopcommerce UserID and Password? No, you won't use the Nopcommerce UserID and Password. you will have to create an Api Clients to get access token.
I am using the nop API plugin for version 4.10. So I not sure we can pass data to post method. I trying with the different format but how we can pass data in JSON?