Magento Error The consumer isn’t authorized to access %resources in Rest API using postman.

While you work with REST API in Magento and you got the error like, The consumer isn’t authorized to access %resources.

Error Response will look like this,

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

Continue reading “Magento Error The consumer isn’t authorized to access %resources in Rest API using postman.”

Check User type is customer or guest in Rest Webapi Magento 2.

Check Current user type using programmatically with Rest Web API. It’s used when you interact with the Webapi in Magento 2.

The difference between Customer and Guest user type is resource access. Customer User type has anonymous or self permission are allowed where later one access only Resources with anonymous permission.

Magento store the constant user type value in Magento\Authorization\Model\UserContextInterface. Continue reading “Check User type is customer or guest in Rest Webapi Magento 2.”

How to identify current user type is integration in Magento 2?

Magento allows API to integrate with a third party system to the interaction between Magento and other platforms.

In Magento, a list of resources that you can access depends on your user type. There are four types of user types available in native out of the box.

List of User types in Magento:
INTEGRATION
ADMIN
CUSTOMER
GUEST Continue reading “How to identify current user type is integration in Magento 2?”