Authenticating Drop-Ins
To start with Drop-In UI Components (aka “Drop-Ins”), we first need to authenticate a client-side SDK with a user-specific accessToken
. This ensures all communication from your frontend are secure and only for a specific user.
In this guide, we walk you through how to:
- Create a User
- Create an Access Token
- Authenticate the Client SDK
1: Create a User
If you already have a userId
skip to Step 2.
To create a new User call the POST /users
API endpoint.
2: Create an accessToken
From your app’s backend request an accessToken
by passing a specific userId
and an expiration time in seconds . This accessToken
can be passed to your app’s frontend (as it does not expose your apiSecret
) and can be used to securely authenticate the Client SDK during one of your end-user’s authenticated sessions
3: Authenticate the Client SDK
In your app’s frontend, include the Client SDK and authenticate it using the accessToken
created in Step 2.