QR Login Code Generation
The QR Login Code is a convenient alternative for user authentication offered by Indee. It works by having the user scan a QR code using the QR code scanner on their phone, which redirects them to a web page for login. Once logged in, the server sends a special token (JWT) to the viewing app or TV app to grant access.
The authorization header must carry the API key that was provided during application registration.
| Header |
Value |
| Authorization |
Bearer api_key |
Endpoint
POST v2/watch/auth/login/qr/get-code
Request Body
{
"device": "iPad",
"udid": "AE74xx"
}
| Parameter |
Type |
Requirement |
Description |
device |
String |
Required |
The device where the native app is running. Supported values are: iPad,AppleTV,Firestick,Roku. |
udid |
String |
Required |
The unique device identifier. |
Response Body
{
"login_code": "ABC90DL",
"login_url": "qr.indee.tv/ABC90DL",
"polling_interval": 10,
"login_code_expiry": 300,
"page_redirect_time": 900
}
| Field |
Type |
Description |
login_code |
String |
A unique login code generated by Indee. |
login_url |
URL |
The URL where your users should be redirected to log in to the application. |
polling_interval |
Integer |
The time (in seconds) between two polling events. |
login_code_expiry |
Integer |
The expiry time (in seconds) of the login code. |
page_redirect_time |
Integer |
The time in seconds to redirect the user to the regular login page after the expiry code has reached its limit. |
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 |
| W4901 |
HTTP 400 |
The requesting device type is not supported |
| W5001 |
HTTP 429 |
Rate limited |
| W5000 |
HTTP 500 |
Unknown server error occurred |