Setting and Using a Proxy with Vonage Video API SDKs


Setting a proxy URL in the Video API SDK.

Applies To

  • Vonage Video SDK
  • Proxy Server


Note: An IP proxy can be used to direct all API traffic except audio/video stream data.

OpenTok.js (JS SDK)

Call the `OT.setProxyUrl()` method to set the proxy server URL:


You must call this method before calling any other OpenTok methods. This ensures that the proxy server is used for OpenTok traffic.

Note: This method was added as an undocumented method in OpenTok 2.17.4. In previous versions, you set the proxy server URL using an undocumented option when calling the `OT.initSession()` method. However, this is option now deprecated and replaced with the `OT.setProxyUrl()` method.

OpenTok Android SDK

Set the proxy server URL by calling the setProxyUrl() method of the Session.Builder object you use to instantiate a Session object:

mSession = new Session.Builder(context, API_KEY, SESSION_ID)

OpenTok iOS SDK

Set the proxy server URL by setting the proxyURL property of the OTSessionSettings object you pass into the `[OTSession initWithApiKey:sessionId:delegate:settings:]` method:

OTSessionSettings *settings = [[OTSessionSettings alloc] init];
settings.proxyURL = @"";
session = [[OTSession alloc] initWithApiKey:kApiKey

OpenTok Windows SDK

Set the proxy server URL by setting the proxyUrl parameter of the Session() constructor:

session = new Session(context: Context.Instance, apiKey: API_KEY,
sessionId: SESSION_ID, proxyUrl: "");
Have more questions? Submit a request