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.”