The following below steps need to follow to get Customer Token or generateCustomerToken mutation By using GraphQL in Magento 2.x / Adobe Commerce 2.x
Here Using PostMan
Step [1] – Recommendation to use below customer tokens in the header of your GraphQL call
Syntax –
mutation {
generateCustomerToken(
email: "Enter Customer Email"
password: "Enter Customer Password"
) {
token
}
}
Step [2] – Put below Request
mutation {
generateCustomerToken(
email: "johndusa1021@gmail.com"
password: "admin123!!"
) {
token
}
}
Instead my email address & password , use your Email & Password
Step [3] – Below output response
{
"data": {
"generateCustomerToken": {
"token": "eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjgsInV0eXBpZCI6MywiaWF0IjoxNjY3OTI1ODI4LCJleHAiOjE2Njc5Mjk0Mjh9.REOqe-9cP-6map8BI12kILabpOK73m3o8nJ-0zkYy6w"
}
}
}