dimaportenko / mma-customapi

Magento 2 add custom rest api endpoints
18 stars 14 forks source link

The consumer isn't authorized to access %resources. #4

Closed amankkcc closed 4 years ago

amankkcc commented 4 years ago

I'm getting this error on every API endpoint of this REST API extension even when I'm adding the bearer token for customer.

amankkcc commented 4 years ago

With admin baerer token it's giving the data. Can we make it open for guest users ?

dimaportenko commented 4 years ago

@amankkcc yes, you need to modify https://github.com/troublediehard/mma-customapi/blob/master/etc/webapi.xml resources tag, set it like this

<resources>
    <resource ref="anonymous"/>
</resources>
amankkcc commented 4 years ago

Thank you so much, I got it figured out. You just saved my day by creating this REST API extension.

dimaportenko commented 4 years ago

@amankkcc welcome!