Skip to content

AudienceClient

readonly baseUrl: string

redeemHandoff(options): Promise<{ message: string; }>

Proves this device too, after a verification link was followed on another one: the page the link led to presents the one-time code from its URL fragment with this device’s visitor token. The answer is the same whatever became of the code (used, expired, unknown), so a call that did nothing looks like one that worked: resolve again and see. createContentClient({ audience }) does this for you.

RedeemHandoffOptions

Promise<{ message: string; }>


resolve(options?): Promise<ResolvedAudiences>

Which audiences is this visitor in, and the signed token that proves it? The content client calls this for you (the audience option of createContentClient); call it yourself only when you use the delivery client directly, and send access.token as audienceToken. It never calls Content, and Content never calls it.

ResolveAudiencesOptions

Promise<ResolvedAudiences>


startSignIn(options): Promise<{ message: string; }>

Asks for a one-time sign-in link to be emailed. The answer never depends on the address (always the same message), so it cannot be used to find out who is a member. After the visitor follows the link, resolve again (the content client does this when the tab becomes visible).

StartSignInOptions

Promise<{ message: string; }>