CreateAccessToken. Authorizаtion
Creating an OAuth token for playing a stream with Private access.
This method does not check if the stream exists on the server, which allows generating a token for playing the stream on any other server with the same secret (see Mediaserver/Configuration/Server (mediaserver.ini)).
POST /api/auth/token/access/
Body | |||||||||
json |
JSON
| ||||||||
tokenrequired | string | Authorization token for API requests. See Mediaserver/Web API/Authorization/CreateApiToken. | |||||||
uidrequired | uid | UID of the stream for which access is required. | |||||||
userrequired | string | User ID for whom the token is being generated. | |||||||
durationrequired | int | Duration of the token's validity in seconds. 0 means the token has no expiration time. |
Response | |||||||||
200 | Returns a JSON string with the token for playing the stream. | ||||||||
JSON
| |||||||||
403 | Authentication error. Incorrect or missing access token for API, see Mediaserver/Web API/Authorization/CreateApiToken. |
Example | |||||||||
JSON
|