2

Working in the REST API and checking with the postman storeConfigs, storeViews, currency etc... API working fine but I am working on Add to Cart API and it's throwing in the below response.

"message": "The consumer isn't authorized to access %resources.",
    "parameters": {
        "resources": "self"
    },

POST URL: http://test.com/rest/V1/carts/mine/items

2
  • I suppose you have used the account of a valid customer? And with that token you are trying the call? Because the error message is saying that the token you have is not ok to be used for that call. Maybe you are using the same you made with the admin credentials. – vbak Aug 13 '19 at 6:46
  • I also tried to add authentication. But not working. – Kirti Nariya Aug 13 '19 at 6:48
0

Get Auth token from this API by putting your username and password in the body as shown in figure. Remember while putting username and password, it must be the same which you registered during installation of magento

This above step will generate a token for testing your rest APIs. In Authorization by selecting type to OAuth 2.0 you have to put above token in access token field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.