Objective
If you are using the REST API, you need to change the authentication method and the base request URL. For an overview of the complete migration process, please refer to this article.
Applies To
- Video API customers planning to migrate from the OpenTok environment to the Unified environment
- Video REST API
Procedure
1. Update the base URL
Update your Video REST API endpoint to the Unified base URL.
- OpenTok: https://api.opentok.com
- Unified: https://video.api.vonage.com
2. Change authentication
The Unified Video REST API also uses JWT authentication in the Unified environment, but the authentication method differs from the OpenTok environment. In the OpenTok environment, JWTs are generated using the Project Key and Project Secret and are sent in the custom request header. In the Unified environment, JWTs are generated using the Application ID and Private Key and are sent as a Bearer token in the Authorization header.
| 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 REST API | Unified Video REST API |
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