Use this method to start direct Audio/Video call request to agent. By this method , Audio/Video chat request will be visible to the agent and on answer to that chat will start Audio/Video call as soon as chat is connected.
Verify your users:
Make sure your users are who they claim to be with identity verification. Enforce identity verification to prevent other from pretend to be (third party) for entertainment or fraud logged-in users.
Generate an HMAC with SHA256 whenever a user logs into your app. Most web frameworks will have a method or library to help you do this. You'll need your app’s secret key and the email of the currently logged-in user.
Secret Key
<YOUR_SECRET_KEY>
For example, in Ruby on Rails we can generate our HMAC using a method called OpenSSL::HMAC.hexdigest, where the first parameter is the name of a hash function (we use SHA256), the second is your secret key, and the third is your user’s email.
Keep your secret key safe! Never commit it directly to your repository, client-side code, or anywhere a third party can find it.
To set up identity verification, you'll need to generate an HMAC on your server for each logged-in user and set in acquireIO SDK.
setVisitorHash must be called before init() takes place and must pass same email in setVisitorDetail().
First, you need to add email id in setVisitorDetail() method in SDK for uniquely identify your users. Note that if you set only visitor hash and email is not set then acquire can't identify visitor. So you need both method to verify visitor hash.
Get Visitor ID using method:
AcquireApp.getVisitorId()
Logout visitor
If you have set visitor hash (HMAC digest) and visitor just logged out from account and need to manage user integrity with agent, call method logOut(MutableLiveData loggedOut) to remove all acquire data from your app related to visitorHash use method :
Pass null instead of MutableLiveData if you do not required a callback.
This method will reset visitor’s all data and stops all connections to the agent including ongoing call.
Caution: Please take a note that all methods of the sdk will stop working after logout so resulting in crash on some method calls. You need to re-initialize the sdk to start again.
User APIs:
Set user details
Set your user details as per your need
You can customize visitor’s identification by calling our sdk’s method setVisitorDetail.