magento is sending the next error when calling a GET API. Does anyone have the solution to the error?
{ "message": "The consumer isn't authorized to access %resources.", "parameters": { "resources": "Magento_Customer::manage" },
magento is sending the next error when calling a GET API. Does anyone have the solution to the error?
{ "message": "The consumer isn't authorized to access %resources.", "parameters": { "resources": "Magento_Customer::manage" },
Please check below possible solutions.
Solution 1 :
Login to Admin >> Stores >> Stores >> Settings >> Configuration >> SERVICES >> Magento Web API >> Web API Security >> Allow Anonymous Guest Access: Yes
Solution 2 :
- Go into System -> Integrations
- Check the Resource Access set to "All".
- check the Access Token value with the Bearer Token value.
- Open Postman Tool.
- Make a GET request to "https://[mymagentohost].com/rest/V1/xyz
- Set the header "Authorization" to "Bearer TOKEN"
- Make sure that there is no space before or after the token, only one after "Bearer"
- "Content-Type" header set to "application/json".