Magento 2 Rest auth for different website ids
-
15-01-2021 - |
Pergunta
I'm getting customer auth token with following REST request
http://mage.local/rest/default/V1/integration/customer/token
It is working fine for customers with website_id = 1, but not works for other website_id.
How should I set website_id in my request?
Solução
I've found how I can log in for a specific store. default in the request is actually store code
http://mage.local/rest/default/V1/integration/customer/token
So to log in for a different store you need to put another store code, like
http://mage.local/rest/STORE_CODE_HERE/V1/integration/customer/token
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange