Objective
If you are using the REST API, there are important differences between the OpenTok environment and the Unified environment. Both the authentication method and the request URL have changed.
Applies To
- Video API
- Migrate from OpenTok to Unified
- REST API
Procedure
1. Update how you generate and use JSON Web Tokens (JWT). The required credentials, signing algorithm, and header format are different:
| OpenTok | Unified | |
| Credentials | Project Key and Project Secret | Application ID and Private Key |
| Algorithm | HS256 | RS256 |
| Header | sent in X-OPENTOK-AUTH | sent as a Bearer token in the Authorization header |
| Example Payloads | |
{
"iat": 1692268800,
"exp": 1692269100,
"application_id": "your_application_id",
"jti": "jwt_nonce"
}
You do not need to configure ACLs in JWT for the Video API. |
| Token Expiration | Maximum 5 minutes (default 5 minutes) | Maximum 24 hours (default 15 minutes) |
| Developer Guide | OpenTok Developer Guide | Unified Developer Guide |
2. Change the base URL used for REST API requests:
- OpenTok: https://api.opentok.com
- Unified: https://video.api.vonage.com
All REST API endpoints should now use the Unified base domain. Be sure to update any hardcoded values in your application or server configuration.
For a complete list of endpoints and parameters, see the Unified REST API reference.
3. Confirm that your REST API integration works correctly. We recommend testing a simple request first. If you receive an authentication error, double-check that you are using Application ID + Private Key for Unified instead of Project Key + Secret from OpenTok.
Additional Information
Articles in this section
- Migrating Video REST API from OpenTok to Unified
- Video Client SDK Changes from OpenTok to Unified
- How to Migrate from OpenTok Server SDK to Unified Server SDK
- Credential Differences Between OpenTok and Unified Environments
- In which Regional Media Zones can I use Experience Composer?
- How do I monitor Video API call quality in real-time?
- JWT Tokens in the TokBox and Unified Environments
- Android SDK 2.28.2 error when using the application context
- What happens if your session lasts more than 8 hours?
- Updates to using the Vonage Media Library in Native SDKs from version 2.27.x onwards