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:
Any help, experience and knowledge sharing would be appreciated.
2 Answers 2
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 : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
-
It should be
/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.Muhammad Hasham– Muhammad Hasham2019年04月16日 07:08:31 +00:00Commented Apr 16, 2019 at 7:08 -
okay just want to share what works as per my experiencefmsthird– fmsthird2019年04月16日 07:14:27 +00:00Commented Apr 16, 2019 at 7:14
Explore related questions
See similar questions with these tags.
POST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment