Combine with authenticationCombine authentication and fact request on a single action
Many times, specially on a registration process you want your users to authenticate and at the same time you require some sort of specific facts, for example name or email.
Facts service allows you to send a fact request with the form of an authentication, with the option auth
cid = @client.facts.request(selfid, [SelfSDK::FACT_EMAIL], async: true, auth: true)
req := fact.FactRequestAsync{
SelfID: selfID,
Description: "info",
Facts: []fact.Fact{{ Fact: fact.FactEmail }},
Expiry: time.Minute * 5,
CID: "conversation_id",
Auth: true,
}
resp, err := client.FactService().RequestAsync(&req)
if err != nil {
return "", err
}
let res = await sdk.facts().request(selfID, [{ fact: 'email_address' }], { async: true, auth: true })