Documentation Index
Fetch the complete documentation index at: https://help-loyalife.xoxoday.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Loyalife uses OAuth 2.0 client credentials flow. You exchange yourclient_id and client_secret for a short-lived JWT bearer token. Every subsequent API call must include this token in the Authorization header.
Getting Your Credentials
Credentials are per-program — each loyalty program has its own distinctclient_id and client_secret. To find yours:
- Log in to the Loyalife Admin portal
- Navigate to Configurations → Program Settings → API
- Copy the Client ID and Secret ID
If you need to regenerate credentials (e.g. after a security incident), use the Reset Client and Secret ID option on the same page. This immediately invalidates all tokens issued with the previous credentials — update your integration before regenerating.
Token Lifetime
Tokens are valid for 30 minutes by default. The exact expiry is in thetokenExpiresOn field of the auth response. Token lifetime is configurable at the environment level — confirm with your Xoxoday implementation contact if a different value applies.
Your integration should:
- Cache the token and reuse it across requests until it expires.
- Proactively refresh before
tokenExpiresOn, or reactively on receiving a401. - Never generate a new token per request — this is wasteful and will approach rate limits faster.
Environments
Both production and staging environments are available. Contact your Xoxoday implementation contact to get the staging base URL for your program. Test against staging before going live.Scopes
Thescope field is optional. Omit it for a general-purpose program token. To bind a token to a specific member (for member-level operations like OTP login):
Rate Limits
Rate limits are configurable perclient_id. The specific limits and the HTTP status returned when exceeded depend on your program configuration — confirm with your Xoxoday implementation contact.
IP Whitelisting
IP whitelisting is not required. The APIs can be called from any server. Always call from a backend server — never expose credentials or make API calls from client-side code (browser or mobile app).Error Responses
All APIs return a consistent error structure:401— Token expired or invalid credentials400— Malformed or invalid request200withIsSucessful: false— Request was structurally valid but failed business logic (e.g. member not found, OTP mismatch)
ExceptionMessage — it is the most reliable field for diagnosing the specific failure.