Skip to main content
Assistant authentication runs at the start of a conversation. Rapida calls your authentication service before the assistant, tools, STT, TTS, or AgentKit backend starts. Use it to verify the user, tenant, subscription, account state, or channel context for the live session.
This is not Rapida API authentication. Rapida API authentication controls who can manage assistants and start sessions. Assistant authentication controls whether one conversation should continue, and what extra context should be added to that conversation.

Configure in Rapida Console

1

Open the assistant

In Rapida Console, open the assistant you want to protect.
2

Open Configure Assistant

Go to Configure Assistant and open the Authentication configuration.
3

Enable authentication

Turn on authentication for the assistant. If authentication is disabled or no authentication configuration exists, Rapida skips this step and the conversation continues normally.
4

Select HTTP provider

Choose HTTP as the authentication provider. HTTP is the supported provider for assistant authentication.
5

Enter endpoint details

Add the authentication endpoint URL, method, timeout, static headers, and request body mapping.
6

Choose failure behavior

Use Block when authentication is required. Use Allow only when the endpoint is used for optional enrichment.
7

Save and test

Save the configuration, then test from the target channel, such as Debugger, Phone Call, Web Widget, Web App, or WhatsApp.

What to configure

Configure a valid body mapping. If the body mapping is missing or invalid, Rapida cannot build authentication arguments and the session continues unauthenticated.

Request body mapping

The body mapping is not a literal JSON body. It maps source variables to request body field names. Example body mapping:
If the session has phone +14155550123, tenant acme, conversation ID 2230142097179373568, and argument customerId=cust_123, Rapida sends this body:
Use these namespaces in the mapping: Unknown or unavailable variables are skipped. Your authentication service should reject requests that are missing required fields.

Endpoint response

Return any 2xx status code to authenticate the session. The response body can be empty, or it can return overrides that Rapida merges before the assistant runtime starts.
Returned values override existing values with the same key. Nested maps are merged, so returning agentkit.metadata.tenant can add tenant routing context without replacing unrelated AgentKit metadata.

Failure behavior

Use block for login, subscription, tenant authorization, compliance, or account access checks. Use allow only when authentication is being used as optional personalization or lookup.

Conditions

Conditions let one assistant use authentication only for specific channels or session types. The supported condition keys are: If multiple rules are configured, all rules must match. If the condition is malformed, authentication is treated as not allowed and the session continues unauthenticated. Example condition for inbound phone voice sessions:

Dynamic AgentKit routing

Assistant authentication can return AgentKit metadata in options. Rapida merges it before opening the AgentKit stream, so your AgentKit backend or load balancer can use authenticated tenant or customer context.
Use metadata for distribution labels such as tenant, region, or customerShard. Keep authorization checks in the AgentKit backend as well; load-balancer routing should not be the only security control. See Scale AgentKit backends for metadata-based routing examples.

Experience

Use authentication overrides to adjust greeting and session behavior.

AgentKit

Run assistant logic in your own AgentKit backend.

Scale AgentKit backends

Route AgentKit traffic by authenticated metadata.

Telemetry

Export conversation events and runtime metadata.