AudienceClient
Properties
Section titled “Properties”baseUrl
Section titled “baseUrl”
readonlybaseUrl:string
Methods
Section titled “Methods”redeemHandoff()
Section titled “redeemHandoff()”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.
Parameters
Section titled “Parameters”options
Section titled “options”RedeemHandoffOptions
Returns
Section titled “Returns”Promise<{ message: string; }>
resolve()
Section titled “resolve()”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.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<ResolvedAudiences>
startSignIn()
Section titled “startSignIn()”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).
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<{ message: string; }>