Skip to content

problem rest authentication #1800

Closed
Closed
@Antonioele

Description

@Antonioele

I request token for an admin user
curl -X POST "http://localhost/magento21/index.php/rest/V1/integration/admin/token" \

 -H "Content-Type:application/json" \
 -d '{"username":"admin", "password":"antonioxxx"}'

Magento respond:
"hlvqig3je87vfg9w3s3cjpqegewxc6e0"
I would view the customers :
curl -X GET "http://localhost/magento21/index.php/rest/V1/customers/me" \ -H "Authorization: Bearer hlvqig3je87vfg9w3s3cjpqegewxc6e0"
answer:
{"message":"Consumer is not authorized to access %resources","parameters":{"resources":"self"}}
Why I have token admin???????????????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions