ShopEazydevelopers
API referenceStorefront APIShopper

Exchange a Firebase ID token for a 14-day shopper session

Credentials
  • Store key
Scopes
members:write
POST
/v1/store/shopper/session

Verified against the store's own sign-in tenant (store.auth.tenantId); a token from another pool is refused. The shopper's profile is mirrored into the store. Keep sessionToken in your own httpOnly cookie and send it as X-Shopper-Session.

Old path, deprecated, sunset 1 Feb 2027: POST /v1/shopper/session.

Authorization

storeKey members:write
headerAuthorizationBearer <sez_pub_... (publishable) or sez_sk_... (secret)>

A per-store key from the console. Publishable keys are browser-safe; secret keys are server-only.

Scope: members:write

Request Body

application/json
  1. body
idToken*string

A fresh Firebase ID token for the shopper.

Response Body

The session.

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.shopeazy.co/v1/store/shopper/session' \  -H 'Authorization: Bearer sez_pub_...' \  -H 'Content-Type: application/json' \  -d '{  "idToken": "eyJhbGciOiJSUzI1NiJ9.EXAMPLE.SIGNATURE"}'
Example Response
{  "data": {    "sessionToken": "shs_EXAMPLE",    "expiresAt": 1794134000907,    "shopper": {      "uid": "N5QACKmZ7d37y4LqAkQzUrk1Fci0",      "email": "thandi.mokoena@example.com",      "name": "Thandi Mokoena",      "phone": null    }  }}