Package io.livekit.server
Class ConnectorServiceClient
-
- All Implemented Interfaces:
public final class ConnectorServiceClient extends ServiceClientBase
A client for interacting with the Connector service.
The Connector service allows you to connect external communication platforms (like WhatsApp and Twilio MediaStreams) to LiveKit rooms.
-
-
Constructor Summary
Constructors Constructor Description ConnectorServiceClient(ConnectorService service, String apiKey, String secret)
-
Method Summary
Modifier and Type Method Description final Call<<Error class: unknown class>>dialWhatsAppCall(String whatsappPhoneNumberId, String whatsappToPhoneNumber, String whatsappApiKey, String whatsappCloudApiVersion, WhatsAppCallOptions options)Dial an outbound WhatsApp call. final Call<<Error class: unknown class>>dialWhatsAppCall(String whatsappPhoneNumberId, String whatsappToPhoneNumber, String whatsappApiKey, String whatsappCloudApiVersion)Dial an outbound WhatsApp call. final Call<<Error class: unknown class>>disconnectWhatsAppCall(String whatsappCallId, String whatsappApiKey)Disconnect an active WhatsApp call. final Call<<Error class: unknown class>>)>connectWhatsAppCall(String whatsappCallId, <Error class: unknown class> sdp)Connect a WhatsApp call with the provided SDP. final Call<<Error class: unknown class>>,io.livekit.server.WhatsAppCallOptions)>acceptWhatsAppCall(String whatsappPhoneNumberId, String whatsappApiKey, String whatsappCloudApiVersion, String whatsappCallId, <Error class: unknown class> sdp, WhatsAppCallOptions options)Accept an incoming WhatsApp call (user-initiated call). final Call<<Error class: unknown class>>,io.livekit.server.WhatsAppCallOptions)>acceptWhatsAppCall(String whatsappPhoneNumberId, String whatsappApiKey, String whatsappCloudApiVersion, String whatsappCallId, <Error class: unknown class> sdp)Accept an incoming WhatsApp call (user-initiated call). final Call<<Error class: unknown class>>,io.livekit.server.TwilioCallOptions)>connectTwilioCall(<Error class: unknown class> twilioCallDirection, TwilioCallOptions options)Connect a Twilio call to a LiveKit room. final Call<<Error class: unknown class>>,io.livekit.server.TwilioCallOptions)>connectTwilioCall(<Error class: unknown class> twilioCallDirection)Connect a Twilio call to a LiveKit room. final static ConnectorServiceClientcreateClient(String host, String apiKey, String secret, Supplier<OkHttpClient> okHttpSupplier)Create a ConnectorServiceClient. final static ConnectorServiceClientcreateClient(String host, String apiKey, String secret)Create a ConnectorServiceClient. final static ConnectorServiceClientcreate(String host, String apiKey, String secret, Boolean logging)final static ConnectorServiceClientcreate(String host, String apiKey, String secret)-
-
Constructor Detail
-
ConnectorServiceClient
ConnectorServiceClient(ConnectorService service, String apiKey, String secret)
-
-
Method Detail
-
dialWhatsAppCall
@JvmOverloads() final Call<<Error class: unknown class>> dialWhatsAppCall(String whatsappPhoneNumberId, String whatsappToPhoneNumber, String whatsappApiKey, String whatsappCloudApiVersion, WhatsAppCallOptions options)
Dial an outbound WhatsApp call.
- Parameters:
whatsappPhoneNumberId- The phone number ID of the business initiating the callwhatsappToPhoneNumber- The phone number of the user to callwhatsappApiKey- The API key of the business initiating the callwhatsappCloudApiVersion- WhatsApp Cloud API version (e.g., "23.0", "24.options- Additional options for the call
-
dialWhatsAppCall
@JvmOverloads() final Call<<Error class: unknown class>> dialWhatsAppCall(String whatsappPhoneNumberId, String whatsappToPhoneNumber, String whatsappApiKey, String whatsappCloudApiVersion)
Dial an outbound WhatsApp call.
- Parameters:
whatsappPhoneNumberId- The phone number ID of the business initiating the callwhatsappToPhoneNumber- The phone number of the user to callwhatsappApiKey- The API key of the business initiating the callwhatsappCloudApiVersion- WhatsApp Cloud API version (e.g., "23.0", "24.
-
disconnectWhatsAppCall
final Call<<Error class: unknown class>> disconnectWhatsAppCall(String whatsappCallId, String whatsappApiKey)
Disconnect an active WhatsApp call.
- Parameters:
whatsappCallId- The call ID sent by MetawhatsappApiKey- The API key of the business disconnecting the call
-
connectWhatsAppCall
final Call<<Error class: unknown class>> )>connectWhatsAppCall(String whatsappCallId, <Error class: unknown class> sdp)
Connect a WhatsApp call with the provided SDP. This is used to provide the answer SDP for a business-initiated call.
- Parameters:
whatsappCallId- The call ID sent by Metasdp- The session description from Meta
-
acceptWhatsAppCall
@JvmOverloads() final Call<<Error class: unknown class>> ,io.livekit.server.WhatsAppCallOptions)>acceptWhatsAppCall(String whatsappPhoneNumberId, String whatsappApiKey, String whatsappCloudApiVersion, String whatsappCallId, <Error class: unknown class> sdp, WhatsAppCallOptions options)
Accept an incoming WhatsApp call (user-initiated call).
- Parameters:
whatsappPhoneNumberId- The phone number ID of the business accepting the callwhatsappApiKey- The API key of the business accepting the callwhatsappCloudApiVersion- WhatsApp Cloud API version (e.g., "23.0", "24.whatsappCallId- The call ID sent by Metasdp- The session description from Metaoptions- Additional options for the call
-
acceptWhatsAppCall
@JvmOverloads() final Call<<Error class: unknown class>> ,io.livekit.server.WhatsAppCallOptions)>acceptWhatsAppCall(String whatsappPhoneNumberId, String whatsappApiKey, String whatsappCloudApiVersion, String whatsappCallId, <Error class: unknown class> sdp)
Accept an incoming WhatsApp call (user-initiated call).
- Parameters:
whatsappPhoneNumberId- The phone number ID of the business accepting the callwhatsappApiKey- The API key of the business accepting the callwhatsappCloudApiVersion- WhatsApp Cloud API version (e.g., "23.0", "24.whatsappCallId- The call ID sent by Metasdp- The session description from Meta
-
connectTwilioCall
@JvmOverloads() final Call<<Error class: unknown class>> ,io.livekit.server.TwilioCallOptions)>connectTwilioCall(<Error class: unknown class> twilioCallDirection, TwilioCallOptions options)
Connect a Twilio call to a LiveKit room.
- Parameters:
twilioCallDirection- The direction of the call (inbound or outbound)options- Additional options for the call
-
connectTwilioCall
@JvmOverloads() final Call<<Error class: unknown class>> ,io.livekit.server.TwilioCallOptions)>connectTwilioCall(<Error class: unknown class> twilioCallDirection)
Connect a Twilio call to a LiveKit room.
- Parameters:
twilioCallDirection- The direction of the call (inbound or outbound)
-
createClient
@JvmOverloads() final static ConnectorServiceClient createClient(String host, String apiKey, String secret, Supplier<OkHttpClient> okHttpSupplier)
Create a ConnectorServiceClient.
- Parameters:
okHttpSupplier- provide an OkHttpFactory if you wish to customize the http client (e.g.
-
createClient
@JvmOverloads() final static ConnectorServiceClient createClient(String host, String apiKey, String secret)
Create a ConnectorServiceClient.
-
create
@JvmOverloads() final static ConnectorServiceClient create(String host, String apiKey, String secret, Boolean logging)
-
create
@JvmOverloads() final static ConnectorServiceClient create(String host, String apiKey, String secret)
-
-
-
-