Magento version 2.3.3
Admin token is successfully obtained using the API, however, when trying to fetch any resource using that token, I get this message: "The consumer isn’t authorized to access %resources."
The user is Administrator and has access to all of the resources. There’s no field labeled "Allow OAuth Access Tokens to be used as standalone Bearer tokens" so that I can enable it.
What else can be done ?
I’m using Postman.
Using OAuth with the integration details in Magento admin to get the admin token from rest/V1/integration/admin/token
Then using the access token in response as a Bearer token to access resources, for example from rest/V1/products
Authorization: "Bearer <admin access token obtained>"
2
Answers
Are you passing the token correctly?
Section Authorization:
Choose Type: Bearer Token
Paste the token like
Or from Magento2 docs (Adobe)
A setting you should be careful with.
Please, log in to the Admin Panel and
Now, you can use your integration’s Access Token as Bearer Token.
🔥 However, you should never use it in client-side code but only in a server-side one to keep it secure.