Magento 2 – Resolving Customer/Token Rest API Issues

customermagento2magento2.3rest apitoken

Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.

Api returns following error:

enter image description here

Any help, experience and knowledge sharing would be appreciated.

Best Answer

For customer token if you want it store wise then you need to pass store_code in the API url

POST <host>/rest/<store_code>/V1/integration/customer/token

But if you haven't configure any stores then pass default

POST <host>/rest/default/V1/integration/customer/token

And to fetch all store data using API

storeStoreRepositoryV1


Group repository interface

http://magento.host/index.php/rest/V1/store/storeGroups
  • method : GET
  • Authorization : Bearer <admin token>

This will return website_id, root_category_id, default_store_id, name, code


Related Topic