Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SecondeJK committed Jan 15, 2025
1 parent 7ea8056 commit a227ace
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ $options = [
'client' => new CustomOpenTokClient(),
'timeout' => 10,
]
$opentok = new OpenTok($apiKey, $apiSecret, $options);
```
#### Migrating to Vonage Video API

There is some useful behaviour on initialization in this SDK that will help as a stopgap before switching out from the
legacy TokBok API to the new, Vonage Video API. To do this, you add a `private_key_path` and
`application_id` into the `$options`. Note that the SDK will read the private key path from the root directory of
the SDK, so you will need to adjust the directory structures accordingly.

```php
use OpenTok\OpenTok;
use MyCompany\CustomOpenTokClient;

$options = [
'application_id' => 'your_application_id',
'private_key_path' => './path-to-your.key'
]

$opentok = new OpenTok($apiKey, $apiSecret, $options);
```

Expand Down

0 comments on commit a227ace

Please sign in to comment.