0

I am calling Rest API in Magento2.3.4 in postman, gives error:

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

enter image description here

and the same error for Customer Rest API.

I am using Administrator user for calling all Rest API's with all permission assigned also have checked it double from its Database Authorization table.

All these API's working on another store with same Magento Version.

I have tried as suggested here:

https://community.magento.com/t5/Magento-2-x-Technical-Issues/REST-API-The-consumer-isn-t-authorized-to-access-resources-2-3-1/td-p/133545#lineardisplaymessageviewwrapper_3

Any idea or help would be appreciated.

  • Did you add customer user name and password? It seems like customer username and password require for this action – Rohan Hapani Aug 5 '20 at 13:07
  • I got the bearer token as you can see in above screenshot from the first Rest API '/rest/V1/integration/admin/token' which I passed in order API. – Shashank Kumrawat Aug 5 '20 at 13:09
  • Do I need to pass username and password in API as well but where? As I remember only token got from first API is passed other Rest API. while same thing is working on another store. – Shashank Kumrawat Aug 5 '20 at 13:11
0

Make sure you are passing the token correctly :) enter image description here

Also make sure you are getting the authorization token from the correct Magento instance

  • thanks for your answer. but I have checked it double. it has bearer token in Authorization field in the header. still not working – Shashank Kumrawat Aug 5 '20 at 13:42

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.