CreateApiToken. Authorizаtion
Creating an OAuth token for accessing the Web API. Each API method, except for this method, must contain an authorization token for the request, either in the token parameter or in the Authorization request header.
This method can only be called from the server where the media server is installed. The hostname in the request URL should always be localhost or the IP address of the local network interface.
Body | |||||||||
json |
JSON
| ||||||||
clientrequired | string | The application identifier for which the token will be created. | |||||||
durationrequired | int | The duration of the token in seconds. 0 - the token's lifespan is not limited. |
Response | |||||||||
200 | Returns a JSON string with the API access token. | ||||||||
JSON
| |||||||||
403 | Authorization error. Invalid or missing API access token. See Mediaserver/Web API/Authorization/CreateApiToken. |
Example | |||||||||
JSON
|