QR Login Get Token
This API helps the viewing app or TV app check in with the server (via polling the backend). When the user scan a QR code using the QR code scanner on their phone, they are sent to a web page to log in. While the user is logging in on the web, the viewing or TV app keeps asking the server for an update. Once the user logs in, the server sends a JWT token to the viewing app.
The authorization header must carry the API key that was provided during the application registration.
| Header |
Value |
| Authorization |
Bearer api_key |
Endpoint
POST v2/watch/auth/login/qr/get-token
Request Body
{
"login_code": "ABC90xx",
"udid": "AE74xx"
}
| Parameter |
Type |
Requirement |
Description |
login_code |
String |
Required |
A unique login code generated by Indee. |
udid |
String |
Required |
The unique device identifier. |
Response Body
{
"token": "<JWT access token>",
"refresh_token": "<JWT refresh token>"
}
| Field |
Type |
Description |
token |
String |
The JWT access token that can be used in subsequent API calls. |
refresh_token |
String |
The refresh token that can be used in subsequent API calls. |
status_code |
String |
The Indee status code for the response. |
status_message |
String |
Human readable message describing the response. |
Status Codes
| Indee status code |
HTTP Response Code |
Description |
| W0000 |
HTTP 200 |
Success |
| W2000 |
HTTP 401 |
Authorization header was either not passed or there was some issue parsing it |
| W2001 |
HTTP 401 |
API key is invalid or expired, or is not fully configured |
| W2009 |
HTTP 401 |
ClientID header was either not passed or is malformed |
| W2100 |
HTTP 403 |
Origin domain is not whitelisted for this API key |
| W2108 |
HTTP 403 |
Watch product is inactive |
| W2102 |
HTTP 451 |
Request blocked by geofencing for the resolved region |
| W2002 |
HTTP 401 |
The login code is invalid or has expired |
| W2101 |
HTTP 403 |
The login code has not been authorized by a signed-in viewer yet |
| W4900 |
HTTP 400 |
Malformed request body |
| W5001 |
HTTP 429 |
Rate limited |
| W5000 |
HTTP 500 |
Unknown server error occurred |