<iframe>. This allows the VIDA experience to be seamlessly integrated into existing applications. The process below explains how to map your internal customers to VIDA organization accounts and then log users into the VIDA application via an iframe. Your app is responsible for:
- Deciding which VIDA organization the user belongs to
- Generating a one‑time auth token for that user/org
- Passing that token (plus the user’s email) to the embedded VIDA app via the iframe URL
Get Started
This section walks through the full integration flow:- Create or look up the VIDA organization
- Generate a one‑time auth token for the user
- Expose a backend endpoint that returns the token
- Construct the iframe URL on the frontend
- Render the VIDA iframe
1. Create or look up the VIDA organization
In your own data model, each of your customers (accounts) should be linked to a VIDA organization. On your backend, use the **Create a new organization **OR **Fetch Account by externalAccountId ** endpoint:- When a new customer signs up in your system:
- Create a corresponding VIDA org via the VIDA reseller APIs, and store its
idalongside your own account ID. Using this endpoint, you should pass in your customer’s account id as externalAccountId, along with optional parameters for syncing billing. Use the docs link below to learn how to create organizations that map to your internal account IDs.
- Create a corresponding VIDA org via the VIDA reseller APIs, and store its
- When an existing customer visits your app:
- Fetch the existing
organizationIdfor that customer by passing in your customer’s account id as externalAccountId. Use the docs link below to learn how to look up an organization that maps to your internal account IDs.
- Fetch the existing
2. Generate a one‑time auth token
Once you’ve verified that the user belongs to a Vida organization, it’s time to fetch a one-time auth token that will autenticate the user into the iframe.On your backend, use the Generate One-Time Auth Token endpoint: The response will include a
short‑lived one‑time authToken which you’ll pass into the iframe.
Your backend then returns something like:
3. Expose a backend endpoint for the frontend
Create an internal endpoint, e.g.GET /api/vida, that:
- Reads the current authenticated user from your session.
- Looks up or creates the corresponding VIDA org.
- Calls VIDA to generate a one‑time auth token.
- Returns the token (and any other info you care about) to the frontend.
Important: This endpoint should only be callable by authenticated users in your app. Never expose your VIDA API credentials in the browser.
4. Build the iframe URL on the frontend
On the client, you:- Fetch
/api/vidawhen the component mounts. - Build the VIDA embed URL using the returned
oneTimeAuthToken, your logged‑in user’s email, and a redirectUrl if present. - Optionally add
onboarding_query parameters to prefill VIDA onboarding (seeOnboarding Prefill via /app/embed).
5. Render the iframe
At this point, the iframe URL should look like:- Verify the
authToken - Verify the
emailmatches the VIDA user - Take the user into their onboarding flow or the main app, depending on their status
Required parameters
The VIDA embed URL must include:authToken
One‑time authentication token used by the embed page to log the user in automatically.- If omitted or invalid, the embed will treat the user as logged‑out.
- You must generate this from your backend using the VIDA API.
- See: vida.io/docs/api-reference/authorization/generate-one-time-auth-token
email
The email address that must match the authenticated VIDA user.- If it does not match, the current VIDA session is invalidated.
- If the email changes (for example, you pass a different email for the same browser), the user will be automatically logged out and re‑authenticated based on the new email and token.
Optional parameters
The VIDA embed URL may include:-
redirectUrl
This is used to redirect users to conversations in the inbox from notification emails. By default, notification emails will link to conversations on your custom domain. If you want notification emails to link to the page your iframe is hosted, follow the steps below:- Visit your reseller dashboard on vida.io
- Navigate to the Settings Tab
- Navigate to the Embed Tab on Setttings
- Enter the url of the page that will host your iframe
- Use the query string parameter value for “redirectUrl” in the iframe url
When the redirectUrl query string parameter is used in the iframe url, the iframe will automatically redirect the user. For example, if your iframe is hosted at myappdomain.com, notification emails will link to myappdomain.com?redirectUrl=yourreseller.automatedphone.ai/app/org/etc..
When the value of redirectUrl is passed into the iframe url, the iframe should succesfully redirect to that correct conversation page.
Onboarding Prefill
Resellers can prefill onboarding template fields and optionally skip steps by passing query parameters. These parameters are optional but are useful to smooth the onboarding experience for new orgs.Naming rules
- All onboarding-related parameters must be prefixed with
onboarding_to avoid collisions. - Template fields: prefix with
onboarding_tf_where the suffix is the field key (e.g.onboarding_tf_businessName). - Timezone / voice / other non‑template fields may have their own keys (e.g.
onboarding_timezone,onboarding_agentVoice).
Multi‑select fields
For multi‑select template fields you can:-
Pass repeated params:
-
or a comma‑separated list:
Unknown or invalid values are ignored; valid values are applied.
Skipping steps
You can skip steps or fields in the onboarding flow with boolean flags:- Skip whole steps:
onboarding_skipTimezone=trueonboarding_skipAgentVoice=true
- Skip individual template fields:
onboarding_skip_tf_<fieldKey>=true
- Skip individual template integrations:
onboarding_skip_ti_<integrationKey>=true
Skipping is not implied by providing a value. You must explicitly set a onboarding_skip_...=true flag to skip a field or step.
Examples
-
Prefill a business name:
-
Prefill an industry:
-
Prefill multi‑select services:
or
-
Prefill timezone and voice, then skip both steps:
-
Skip a specific template field:
-
Skip a specific integration:
Notes
- Prefills apply immediately if a template is already selected and persist through selecting a template.
- Skipped fields or steps require explicit boolean flags.
- Unknown or invalid option values are ignored; valid values are applied.
Summary
- Embedding VIDA is done with a single iframe pointing to
/app/embedon your reseller subdomain. - Your backend is responsible for:
- Creating/looking up the VIDA organization
- Generating a
one‑time authTokenfor the current user - Providing that token to your frontend (e.g. via
/api/vida)
- Your frontend:
- Fetches the auth token
- Builds the iframe URL with
authTokenandemail - Optionally passes
onboarding_parameters to prefill and streamline onboarding
- VIDA handles login, user verification, onboarding, and the full app experience inside the iframe—no separate signup flow parameters are required in the embed URL.