JS SDK: Allowed IP List not applied when ipWhitelist is passed as a string JS SDK: Allowed IP List not applied when ipWhitelist is passed as a string

JS SDK: Allowed IP List not applied when ipWhitelist is passed as a string

Kenny Domingo

Symptom

Even when the Allowed IP List feature is expected to be active, the JS SDK behaves as through the feature is not enabled.

Applies To

  • OpenTok
  • JS SDK
  • Enterprise environment projects
  • Allowed IP List

Resolution

Pass the ipWhitelist flag correctly as a boolean:
 
Correct

OT.initSession(apiKey, sessionId, { ipWhitelist: true }); 

Incorrect

OT.initSession(apiKey, sessionId, { ipWhitelist: 'true' }); 

 

Cause

This issue occurs when the ipWhitelist flag is passed as a string instead of a boolean.

 

Additional Information

When the Allowed IP List is not activated, connection setup may take longer, but the session will still connect successfully. 

For full setup instructions and all required steps, please refer to the developer guide:

OpenTok: https://tokbox.com/developer/guides/ip-addresses/

Unified: https://developer.vonage.com/en/video/guides/ip-addresses

How to recognize if I’m using Vonage Video API Unified Environment or Vonage Video API OpenTok environment?