MutationLoginAsCustomer · Magento 2.4.9
generateCustomerTokenAsAdmin
generateCustomerTokenAsAdmin is a Magento 2 GraphQL mutation in the LoginAsCustomer module. Request a customer token so that an administrator can perform remote shopping assistance. It returns GenerateCustomerTokenAsAdminOutput and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Resolver class
Magento\LoginAsCustomerGraphQl\Model\Resolver\RequestCustomerToken
Arguments
An input object that defines the customer email address.
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation ($input: GenerateCustomerTokenAsAdminInput!) {
generateCustomerTokenAsAdmin(input: $input) {
customer_token
}
}Variables
{
"input": {
"customer_email": ""
}
}Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.