Overview
The embedded flow editor uses a 3-step authentication flow that keeps your client secret secure on your backend while giving the iframe short-lived access tokens.Prerequisite: Create an OAuth Client
Before starting the integration, you need to create an OAuth Client linked to the workspace that will be embedded.- Go to the whatabot Dashboard
- Navigate to the Workspaces screen
- Click Edit on the desired workspace
- Go to the Embed tab
- Click Create Client and copy the
clientIdandclientSecret
Authentication flow
Step 1: Get a one-time token (OTT)
Your backend calls the whatabot API with Basic Auth using the client credentials. This returns a one-time token that is valid for 60 seconds.The OTT expires after 60 seconds. Your frontend must exchange it before it
expires. Each OTT can only be used once.
Why use a one-time token?
The OTT pattern ensures that theclientSecret is never exposed in frontend code. Your backend holds the secret and generates short-lived, single-use tokens that the frontend can safely pass to the iframe.