I was able to get the admin token using the below url against the created admin user http://username:[email protected]/index.php/rest/V1/integration/admin/token
The username and password is for browser authentication which you can see before the url which is defined in .htaccess and .htpassword. The original username and password is given in the body
{
"username":"admin",
"password":"admin123"
}
But when I get customers by passing the token it says 401 unauthorized. Below is the request
http://username:[email protected]/index.php/rest/V1/customers and token is passed as "Authorization: Bearer abcdefghi" in request header
How to fix this issue?