Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python AuthSettings: Difference between revisions

From Leeroopedia
Auto-imported from implementations/Elevenlabs_Elevenlabs_python_AuthSettings.md
 
Sync from local file
 
Line 98: Line 98:
== Related Pages ==
== Related Pages ==


* [[Elevenlabs_Elevenlabs_python_GetAgentResponseModel]] - Full agent response model that includes platform settings
* [[Implementation:Elevenlabs_Elevenlabs_python_GetAgentResponseModel]] - Full agent response model that includes platform settings
* [[Elevenlabs_Elevenlabs_python_PrivacyConfig]] - Privacy configuration for conversations
* [[Implementation:Elevenlabs_Elevenlabs_python_PrivacyConfig]] - Privacy configuration for conversations
* [[Elevenlabs_Elevenlabs_python_AgentConfig]] - Core agent configuration
* [[Implementation:Elevenlabs_Elevenlabs_python_AgentConfig]] - Core agent configuration


[[Category:Implementations]]
[[Category:Implementations]]

Latest revision as of 10:37, 27 September 2026

Field Value
source Elevenlabs_Elevenlabs_python
domains Conversational AI, Authentication, Security
last_updated 2026-02-15

Overview

Description

AuthSettings is a Pydantic model that defines the authentication and access control settings for a conversational AI agent in the ElevenLabs platform. It controls whether conversations require signed tokens, which hosts are allowed to initiate conversations, and whether origin headers are enforced.

This model is auto-generated by Fern from the ElevenLabs API definition and inherits from UncheckedBaseModel. It is used to secure agent endpoints and restrict unauthorized access to conversational agents.

Usage

AuthSettings is used within agent platform settings to control who can start conversations with an agent. It supports token-based authentication, host allowlisting, and origin header enforcement to prevent unauthorized embedding or access.

Code Reference

Source Location

src/elevenlabs/types/auth_settings.py

Class Signature

class AuthSettings(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import AuthSettings

I/O Contract

Field Type Required Description
enable_auth Optional[bool] No If set to true, starting a conversation with an agent will require a signed token.
allowlist Optional[List[AllowlistItem]] No A list of hosts that are allowed to start conversations with the agent.
require_origin_header Optional[bool] No When enabled, connections with no origin header will be rejected. If the allowlist is empty, this option has no effect.
shareable_token Optional[str] No A shareable token that can be used to start a conversation with the agent.

Usage Examples

Enabling Token-Based Authentication

from elevenlabs.types import AuthSettings

auth = AuthSettings(
    enable_auth=True,
    require_origin_header=True,
)

Configuring Host Allowlist

from elevenlabs.types import AuthSettings, AllowlistItem

auth = AuthSettings(
    enable_auth=True,
    allowlist=[
        AllowlistItem(host="https://myapp.example.com"),
        AllowlistItem(host="https://staging.example.com"),
    ],
    require_origin_header=True,
)

Using a Shareable Token

from elevenlabs.types import AuthSettings

auth = AuthSettings(
    enable_auth=False,
    shareable_token="share_tok_abc123def456",
)

Related Pages