Password protection
When password protection is enabled, viewers must enter a password to view live stream or on demand video content.
Get status of password protection
Check the password protection status of the channel.
GET https://api.video.ibm.com/channels/{channel_id}/locks/password.json
Parameters
This request has no parameters.
Success response
Upon success a response with HTTP status “200 OK” is returned with the following key-value structure.
| KEY | TYPE | DESCRIPTION |
|---|---|---|
enabled | boolean | Password protection status |
Error responses
Possible error responses:
| HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
|---|---|---|
| 403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
| 404 Not Found | not_found | Channel not found |
| 503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Set password and enable protection
Set the channel password and enable password protection.
PUT https://api.video.ibm.com/channels/{channel_id}/locks/password.json
Parameters
The parameters for the PUT request:
| PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
|---|---|---|---|
password | string | REQUIRED | The new channel password |
Success response
Upon success, a response with HTTP status “201 Created” is returned.
Error responses
Possible error responses:
| HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
|---|---|---|
| 400 Bad Request | input_validation_error | The given password is invalid. |
| 403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
| 404 Not Found | not_found | Channel not found |
| 503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Remove password protection
Remove the password and disable password protection on the channel.
DELETE https://api.video.ibm.com/channels/{channel_id}/locks/password.json
Parameters
This request has no parameters.
Success response
For this request an empty response is returned.
Error responses
Possible error responses:
| HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
|---|---|---|
| 403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
| 404 Not Found | not_found | Channel not found |
| 503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |