Skip to content

Impersonate Customer

This is the API equivalent of the datagrid's Login as Customer action. It returns a short-lived customer Bearer token the admin can use to act as the customer against the storefront API.

Overview

See the Customers menu overview for the full feature flow.

All admin endpoints require an admin Bearer token — see Authentication.

EndpointMethod
/api/admin/customers/{customerId}/impersonatePOST

Response fields

FieldTypeNotes
tokenstringThe customer Bearer token. Returned once — store it immediately.
customerIdintegerThe impersonated customer.
customerEmailstring
customerNamestring
impersonatedByAdminIdintegerThe admin who issued the token (audit).
expiresAtstringExpiry timestamp — the token is valid for 1 hour.

Token expires in 1 hour

The plaintext token is returned only once and cannot be retrieved again. Use it as a regular customer Bearer against the /api/shop/* endpoints to act as the customer.

Permission: customers.customers.edit.

Released under the MIT License.