In Magento 2.1.5 I cannot use webapi when I am logged in as admin user. I found this problem on my regular install and verified with a freh one:

  • install magento 2.1.5 from composer repository
  • log-in as the newly created admin user
  • open domain.com/rest/V1/customers/1


  <message>Consumer is not authorized to access %resources</message>

I cannot access any resource although I'm logged in. Is this a bug in magento2 or am I doing something wrong here? Hard to believe for me that something so severe should be a bug.

  • are you using any auth? Apr 5 '17 at 8:54
  • No, I think it should be possible via session? Apr 5 '17 at 8:59
  • Not at all. devdocs.magento.com/guides/v2.0/get-started/authentication/… There you have quite nice explain how it works ;) Apr 5 '17 at 9:05
  • I read that quite many time times before.... In the first table, it says "Administrator or Integration". For me that means that when I create an api endpoint with resource, say Magento_Backend::admin, that all integrations I create wit that permission can access this end point (this works, no problem) and that all admin users with that permission can also access the endpoint (that authentication via session). Why else they say "Administrator or Integration"? Apr 5 '17 at 9:12
  • 1
    They even explicitly say: "For example, if administrators are authorized for the Magento_Customer::group resource, they can make a GET /V1/customerGroups/:id call." Apr 5 '17 at 9:15

Your Answer

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

Browse other questions tagged or ask your own question.