I am trying to return a list of customer groups via the API.
I have created an integration, I have run the following
curl -X GET "https://myIP/rest/all/V1/customerGroups/0" -H "accept: application/json" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"group\": { \"id\": 0, \"code\": \"string\", \"tax_class_id\": 0, \"tax_class_name\": \"string\", \"extension_attributes\": {} }}" "Authorization: Bearer MY API KEY"
And all I keep getting is
{"message":"The consumer isn't authorized to access %resources.","parameters":{"resources":"Magento_Customer::group"}}curl: (3) Port number ended with ' '
A company integrating with my software is facing the same issue. I am at my wits end!
Hello @scibot
I am assuming that you are passing
Authorization: Bearer "MY API KEY"
here MY API KEY is actually a token which you will get from admin API which you can take reference from here :
https://devdocs.magento.com/guides/v2.3/rest/tutorials/prerequisite-tasks/create-admin-token.html
Make sure the account you are using for admin token has ACL to access this API, or use administrator account.
Let us know if still facing issue.