Before using the API, you need authorization to access a VideoManager. Authorization is granted by creating an access and refresh token. These are strings used to identify a user after they provide valid login credentials.
Token Type | Description | Valid for... |
---|---|---|
Access Token | This is required to grant access to the data provided by the API. | 5 minutes |
Refresh Token | Use this to generate a new access token after the old one expires. This allows access to continue without the need to provide login credentials again. | 1 hour |
Use the "Create access and refresh token" method described below (and on Apiary here) to provide login credentials in exchange for both of these tokens. If you have multiple VideoManagers, the response will show which VideoManager the access token is assigned to. To gain access to a specific VideoManager, use the "Create refresh token" method described below (and on Apiary here).
The URLs in the methods below refer to the general live instance of movingimage. Customers using a VideoManager on a custom domain must adjust the URLs accordingly.
Create Access and Refresh Token Request
curl -X POST -H "Content-Type: application/json" -d "{ 'username':'<USERNAME>', 'password':'<PASSWORD>' }" https://api.video-cdn.net/v1/vms/auth/login
JSON Body | Data Type | Description |
---|---|---|
username | String | mandatory: User name for VideoManager Pro |
password | String | mandatory: User's password |
Sample Response
{ "accessToken": <ACCESS_TOKEN>, "refreshToken": <REFRESH_TOKEN>, "videoManagerList": [{"id":<VIDEOMANAGER_ID>,"name":<VIDEOMANAGER_NAME>}, {...}], "validForVideoManager": "<VIDEOMANAGER_ID>" }