Skip to main content
POST
/
api
/
v3
/
store
/
auth
/
login
Spree SDK
import { createSpreeClient } from '@spree/sdk'

const client = createSpreeClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const auth = await client.store.auth.login({
  email: 'customer@example.com',
  password: 'password123',
})
{
  "token": "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImU3NmVjMGNiLTQ4M2YtNGIxZS1hMzI4LWEyNmM3MjEzZDZmYSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzcyNjY5ODA1fQ.NdHVrcagM6ZhS6uZzyyBU3Qz1yyasS3OEjEY5epIlZA",
  "user": {
    "id": "cus_UkLWZg9DAJ",
    "email": "test@example.com",
    "first_name": "Gaylord",
    "last_name": "Abbott",
    "created_at": "2026-03-04T23:16:45.224Z",
    "updated_at": "2026-03-04T23:16:45.224Z",
    "addresses": [],
    "default_billing_address": null,
    "default_shipping_address": null
  }
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Headers

x-spree-api-key
string
required

Body

application/json
email
string<email>
required
Example:

"customer@example.com"

password
string
required
Example:

"password123"

provider
string

Authentication provider (default: email)

Example:

"email"

Response

login successful

token
string
required

JWT access token

user
object
required