ID client is the customer-facing half of the Omneo SDK. Use it whenever you cannot safely ship an admin token: storefronts, profile portals, in-app customer UIs, and any browser code that needs to read or update a single profile.
The full admin client lives separately. See Using the Omneo SDK if you need server-side access to the full API.
How it works
The flow has three steps:1
Server holds an admin token
Your backend keeps a long-lived Omneo API token, created in CX Manager.
2
Server mints a profile-scoped token
Your backend calls
id.auth.requestAuthToken({ id }). Omneo returns a short-lived JWT (IDToken) bound to that single profile.3
Browser uses the token
Your backend hands the
IDToken to the browser, in a cookie, template variable, or theme metafield. Browser code initialises new ID({ tenant, IDToken }) and calls id.profile.* methods. The token only works against the profile it was minted for.ID client targets https://api.[tenant].getomneo.com/id/api/v1, a different surface from the admin API.
Server-side: minting the token
Install the SDK and callrequestAuthToken from a trusted server. Pass the admin token only at this step.
id_handle:
Anonymous tokens
Omit theid field to mint a token with no profile association. Anonymous tokens can only create or upsert a profile, they cannot read or update an existing one.
Browser-side: using the token
In the browser, initialise the client with the pre-fetchedIDToken. Never pass omneoAPIToken here.
Token helpers
TheID client tracks token expiry internally once a token is set on the constructor or returned by requestAuthToken.
getProfileID() decodes the JWT using Node’s Buffer. In a browser bundle that does not polyfill Buffer (some lean Vite or esbuild setups), this helper throws. The rest of the ID surface is browser-safe.Profile methods
Theid.profile namespace operates on the profile bound to the token. No profile ID is passed.
Sub-resources scoped to the bound profile:
achievements, addresses, aggregations, attributes, balances, benefits, connections, credits, identities, interactions, ledgers, lists, orders, points, redemptions, regions, rewards, tiers, transactionClaims, transactions.
Each sub-resource exposes the same shape as the Omneo client, without the profile ID argument.
Anonymous use: create a profile
With an anonymous token, the only supported action is to create or upsert a profile. The most common pattern is a sign-up form that converts the resulting profile into a logged-in session by minting a fresh, profile-scoped token server-side.Locations through the ID API
The ID API exposes a read-only locations endpoint, useful for store finders on a storefront. Call it throughid.call():
Shopify integration
The Omneo Shopify plugin handles the mint-and-store cycle for you. It stores theIDToken in localStorage under the key shapes:omneo:shapestoken:{customer_id}. The shapes: prefix is a legacy naming artefact, preserved so that already-deployed stores keep working. Read it first, mint a fresh token if missing or expired:
customerSignature is the HMAC-SHA256 of the Shopify customer.id, signed with the plugin secret stored in shop metafields. In Liquid:
Escape hatch: id.call()
Use id.call() for any ID endpoint the SDK does not yet wrap natively. Authentication and base URL are handled for you.
omneo.call(). See Using the Omneo SDK for the reference.