Before you enable the setting
For each project, prepare:- A customer application that authenticates its users and loads the compatible Gleap JavaScript SDK.
- Server-side identity verification, using that project’s identity verification secret.
- An HTTPS application entry URL that supports the login flow below.
- Confirmation from Gleap that authenticated file access is available for your region and your deployed SDK integration.
1. Set up verified customer identity
After your backend authenticates a user, generate an HMAC-SHA256 hash from their stable user ID using the project’s identity verification secret. Derive the user ID from the authenticated server session, not an arbitrary user ID supplied by the browser.Gleap.clearIdentity() when the user signs out or before switching accounts.
Deploy and verify this integration before turning on Enforce identity verification in Project settings → User identity. Enabling enforcement without valid hashes will cause existing identify calls to fail.
2. Choose the customer application URL
In Project settings → User identity → Conversation file access, the Customer application URL is your application’s HTTPS entry point, for example:gleapFile query parameter:
3. Preserve the requested file through login
Your application must keepgleapFile in the final page’s query string until the SDK has processed it after verified identification.
- On arrival, read the
gleapFileparameter. If the customer is already signed in, keep it on the page and initialize/identify with Gleap as usual. - If the customer is signed out, preserve the destination through your existing login or SSO return flow. Use your authentication framework’s supported return-state mechanism and validate return destinations as local or explicitly allowed application URLs.
- After successful login, return to the Gleap-enabled page with the same query parameter, for example
/support?gleapFile=0123456789abcdef01234567. - Load the compatible SDK and call verified
Gleap.identifyfor the signed-in customer. Do not strip the parameter during an SPA route change or move it into a URL fragment. - The SDK checks the customer’s permission and opens the associated conversation. The customer can then view or download its permitted attachments.
4. Activate each project
Coordinate activation with Gleap after the integration and regional rollout are ready. As a project administrator:- Open Project settings → User identity and confirm Enforce identity verification is enabled.
- Under Conversation file access, enter the Customer application URL.
- Turn on Require authenticated file access. The URL is saved together with this toggle; entering it alone does not save it.
- Confirm that the setting was saved successfully. Refresh dashboard tabs before testing new uploads.
5. Verify your actual application
Use a test customer and conversation in each application:- Upload a new attachment as the customer and as an agent. Confirm both authorized sides can read the customer-visible files.
- Follow the protected viewer link while signed out. Complete login and confirm the original
gleapFilereaches the application and the correct conversation opens. - Repeat while already signed in. Test the full SSO flow, if used.
- Open the file link in a clean browser and as a different customer. Neither should receive the protected bytes without the required identity and conversation permission.
- Sign out and confirm new file requests no longer succeed under the old customer’s identity. Already downloaded bytes cannot be recalled.
- Check email and external-channel attachment links. Recipients must be able to sign in to the configured application as the verified customer associated with that conversation; an email address or a shared link alone is insufficient.
Troubleshooting
Turning the setting off affects future uploads only. Previously protected files stay protected, and identity verification must remain enabled for their access.