Generates a new JWT token for the authenticated user
JavaScript
import { createSpreeClient } from '@spree/sdk' const client = createSpreeClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const auth = await client.store.auth.refresh({ bearerToken: '<token>', })
{ "token": "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImJiNDNhYmEzLTQyZmEtNDBmMS1iOGY0LWM3ZDRlZGFjMDk2MCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzcyNjY5ODA3fQ.LDpIaRzMzrSuM5zPTyNkslNJLMQ6jqjQiYAgkE66RTw", "user": { "id": "cus_UkLWZg9DAJ", "email": "test@example.com", "first_name": "Senaida", "last_name": "Mayer", "created_at": "2026-03-04T23:16:47.183Z", "updated_at": "2026-03-04T23:16:47.183Z", "addresses": [], "default_billing_address": null, "default_shipping_address": null } }
Publishable API key for store access
JWT token for authenticated customers
Bearer token
token refreshed
JWT access token
Show child attributes
Was this page helpful?