-
public final class TokenServiceService for fetching conversation tokens from ElevenLabs API
This service handles authentication with the ElevenLabs API to obtain conversation tokens for private agents and connection details.
-
-
Constructor Summary
Constructors Constructor Description TokenService(String baseUrl, OkHttpClient httpClient, Gson gson)
-
Method Summary
Modifier and Type Method Description final TokenResponsefetchPublicAgentToken(String agentId, String source, String version, String environment)Fetch a conversation token for a public agent (no API key required) -
-
Constructor Detail
-
TokenService
TokenService(String baseUrl, OkHttpClient httpClient, Gson gson)
-
-
Method Detail
-
fetchPublicAgentToken
final TokenResponse fetchPublicAgentToken(String agentId, String source, String version, String environment)
Fetch a conversation token for a public agent (no API key required)
- Parameters:
agentId- The ID of the public agent to get a token forsource- Optional source identifier (defaults to "android_sdk")version- Optional version string (defaults to SDK version)environment- Optional environment name (defaults to "production" on the server)
-
-
-
-