Skip to content
中文

Customer directory

Customer keeps one viewer list per organization: the same viewer is one person across your agents, contents and applications, identified by the customer_id you already use in your own system.

Quickstart · Limits and errors

When to use it

Your end users, one identity across agents, content and apps.

Use it when

  • End users must sign in, or be banned.

Not for, use instead

  • Colleagues → account
  • Sales leads → crm

How it behaves

  • Your backend issues one-time grant codes scoped <type>:<id>:<action>.

Combines with

  • Gates content, service agents and apps.

Entry: praxis.customer.* · docs developers/customer/index

See them in the Console

Open Console → 终端用户 (End users) (/org/end-users). The list holds the end users of your agents and apps; filter by “全部” (All), “已识别” (Identified) or “匿名” (Anonymous), or search. Click a row for the detail: what the person has used, recent activity and status.

The three credentials of one sign-in

  • Grant code: minted by your backend with the API key, single-use and short-lived (900 seconds by default); it carries the resources this sign-in may use and may be bound to an origin. Its fields are customer_id, origin and resources.
  • Access token: the browser exchanges a grant code (a signed-in viewer) or a publishable key (an anonymous visitor) for it; it lives at most an hour and is renewed automatically by <praxis-video> and the page session.
  • Publishable key: admits anonymous visitors into an anonymous identity; an anonymous customer_id starts with anon_.

Resource scopes

A scope is <type>:<id>:<action>: agent:chat, content:play, application:visit; writing * in the id position means every object of that type. One issuance carries 1–50 scopes. The scopes live on the sign-in, not in the token itself; each product reads them when it checks an entrance.

Directory and administration

What you wantEndpoint
Read the directory, filtered by type, blocked, resource, qGET /customer/v1/customers
Read one viewer (?expand=products,sign_ins,usage)GET /customer/v1/customers/{customer_id}
Block / unblockPOST /customer/v1/customers/{customer_id}/block (body {"reason":"…"}) / unblock
Revoke every token of one viewerPOST /customer/v1/customers/{customer_id}/revoke_tokens
Read one viewer’s usage (?from=&to=)GET /customer/v1/customers/{customer_id}/usage
Delete one viewer (?confirm={customer_id})DELETE /customer/v1/customers/{customer_id}
List, create or delete publishable keys`GET

After a block or a revoke, the tokens that viewer holds stop working at once. A block covers the whole organization: a blocked viewer cannot sign in to any of its resources. To keep a viewer away from one resource only, leave that resource out of resources when you issue the grant code. See Limits and errors for the full error list.

Agent signage

Agents currently embed through embedding tokens, which is not the Customer directory path; see Embedding tokens.

Where it is used

Online course assistant uses the Customer directory to recognize viewers, who then watch course videos and ask the assistant.