I would like to use the Rest API to get a client token first. And then use this token to login as Magento2 client. E.g. domain.com? customerToken = xyz

Are there any ready-made methods / modules for this in Magento2? I can probably call the magento rest api from the magento module (call the rest api from magento itself) to verify token is correct, but there is probably some other better solution?

1 Answer 1


You can try Login API:

Interface providing token generation for Customers
POST /V1/integration/customer/token

API URL: {baseurl}/rest/V1/integration/customer/token

Method: POST


        "username": "[email protected]",
        "password": "Test@123"



Reference : https://devdocs.magento.com/guides/v2.4/get-started/authentication/gs-authentication-token.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.