Identify your users
To effectively manage your contacts, we advise usingidentifyContact each time a user signs in or registers. This practice ensures accurate identification of your contacts from the outset. Additionally, for scenarios where contact information needs to be updated during active usage – such as when a user subscribes to a new plan or modifies their existing data – we recommend utilizing updateContact. This method allows for seamless real-time updates to contact details.
Identify your user by calling the following method.
- Swift
- Objective-C
When transmitting custom data, only primitive numeric and string values are supported for later use in segment filters.
Please note that you can send only 35 custom data keys with an identify call.We currently only allow JSON strings, numbers and boolean values as custom data.
Gleap defaults to guest sessions when feedback items get reported without
calling the identify method first. All feedback items of an existing guest
session are merged with the user session once you’ve identified it.
Enforce identity verification
Enforce identity verification to prevent third parties from impersonating logged-in users. Learn how to generate the user hashProtected conversation files
With Require authenticated file access (Authenticated conversation files), conversation files can only be opened by agents and by the verified customer the conversation belongs to. The SDK (19.0.0 or newer) supports it without extra setup, as long as your app identifies the customer with the user hash (see above) on every app start. A verified identify gives the session a short-lived file access token (15 minutes). The SDK keeps it in memory only, hands it to the widget and renews it automatically while the app is in use.clearIdentity revokes it. Guests and contacts identified without a hash see “Sign in to view” instead of the file.
Email replies link attachments to your customer application URL with a gleapFile query parameter. If that URL opens your app (for example as a universal link), pass the URL that opened the app to Gleap; the conversation opens once the customer is identified:
- Swift
- Objective-C
Update contact properties
To effectively manage your contacts, we advise usingidentifyContact each time a user signs in or registers. This practice ensures accurate identification of your contacts from the outset. Additionally, for scenarios where contact information needs to be updated during active usage – such as when a user subscribes to a new plan or modifies their existing data – we recommend utilizing updateContact. This method allows for seamless real-time updates to contact details.
Clear the identity on logout
We recommend to clear the identity once the user logs out. Clearing the identity will automatically detach the current session and create a new guest session.- Swift
- Objective-C
Get the identification status of a user
With the following method, you can get the status of the current user identity.- Swift
- Objective-C
Get the current user identity
With the following method, you can get the current user identity.- Swift
- Objective-C