api:iptv:app:reservecode
Table of Contents
API : IPTV : App : Reserve Code
Introduction
This request is used by an Apple TV or Android TV box to reserve a 4-char code that can be used on another device/web browser to login the device.
The device will request this, get a code back and display it on the screen. The device will then re-send this request until the reply also has a token in the response At this point the device has been created on the system and it can proceed to call validate and retrieve all its settings using the token.
A code will only live for 5 minutes.
Request
| URL | https://api.telecomx.dk/iptv/app/reservecode | ||
|---|---|---|---|
| Method | GET | ||
| deviceId | String | Unique id of the device, as generated once by the app. | |
| type | String | Type of device: ANDROIDTV or APPLETV. | |
| model | String | The model of the device, e.g. 'Nvidia Shield'. | |
| name | String | [optional] Name of the device. |
|
Query example
https://api.telecomx.dk/iptv/app/reservecode?deviceId=f4895yhr8hr9h84hif&type=APPLETV&model=AppleTV%204K&name=Stue
Response
| JSON object | ||
|---|---|---|
| code | String | The 4-char code. |
| token | String | Token created for this device, exists when another device has used the code to login the device. |
Note that properties holding no value may be omitted from the object.
Example
{ "code": "4FA3", "token": "12345678901234567890ABCD" }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | deviceId | DeviceId is missing or invalid |
| 422 | type | Type is missing or invalid |
| 422 | model | Model is missing or invalid |
| 500 | internal_error | <Unspecified> |
api/iptv/app/reservecode.txt · Last modified: 2020/01/20 13:01 by Per Møller