@@ -88,22 +88,26 @@ $opentok = new OpenTok($apiKey, $apiSecret, $options);
8888#### Migrating to Vonage Video API
8989
9090There is some useful behaviour on initialization in this SDK that will help as a stopgap before switching out from the
91- legacy TokBok API to the new, Vonage Video API. To do this, you add a ` private_key_path ` and
92- ` application_id ` into the ` $options ` . Note that the SDK will read the private key path from the root directory of
93- the SDK, so you will need to adjust the directory structures accordingly.
91+ legacy TokBok API to the new, Vonage Video API. To do this, you can pass in an Application ID for the API Key, and the path to
92+ a Vonage private key as the API Secret.
9493
9594``` php
9695use OpenTok\OpenTok;
9796use MyCompany\CustomOpenTokClient;
9897
99- $options = [
100- 'application_id' => 'your_application_id',
101- 'private_key_path' => './path-to-your.key'
102- ]
98+ $applicationID = '61bb2dae-9b69-400c-9abb-642d082af5fc';
99+ $privateKey = './private.key';
103100
104- $opentok = new OpenTok($apiKey , $apiSecret, $options );
101+ $opentok = new OpenTok($applicationID , $privateKey );
105102```
106103
104+ The SDK will notice that the authentiction has changed, and will automatically start to forward requests to the Vonage API Routes
105+ instead of the OpenTok API Routes. All requests and responses in your code should be exactly the same as they are on the
106+ OpenTok API.
107+
108+ ** NOTE:** The SDK will read the private key path from the root directory of your project (generally one level above the docroot
109+ of your application), so you will need to make sure that the path provided is either absolute, or relative to your project root.
110+
107111### Creating Sessions
108112
109113To create an OpenTok Session, use the ` createSession($options) ` method of the
0 commit comments