app-version-check.md
App Version Check API
Clients (mobile and TV apps) should call this endpoint on app startup to determine if the user needs to update their app.
Endpoint
GET /client/v1/app-version?platform={platform}¤tVersion={version}
No authentication required.
Parameters
| Parameter | Type | Description |
|---|---|---|
platform |
int | The client platform (see table below) |
currentVersion |
string | The app's current version (e.g. 1.2.3) |
Platform Values
| Value | Platform |
|---|---|
| 0 | Android |
| 1 | iOS |
| 2 | LG TV |
| 3 | Samsung TV |
| 4 | Apple TV |
| 5 | Android TV |
Response
{
"minimumVersion": "2.1.0",
"forceUpdate": true,
"updateRequired": true
}
| Field | Type | Description |
|---|---|---|
minimumVersion |
string | The minimum version required by the backend |
forceUpdate |
boolean | If true, the user must update before using the app |
updateRequired |
boolean | If true, the user's current version is below the minimum required version |
Implementation
1. Call the endpoint on app startup
Send a GET request before the user interacts with the app.
GET /client/v1/app-version?platform=0¤tVersion=1.0.0
2. Handle the response
updateRequiredisfalse: No action needed. Proceed normally.updateRequiredistrueandforceUpdateisfalse: Show a dismissible prompt suggesting the user update.updateRequiredistrueandforceUpdateistrue: Block the app with a full-screen message and a button linking to the app store. Do not let the user proceed.
3. Handle errors
If the request fails (network error, timeout, server error), let the user continue using the app. Do not block the user because of a failed version check.
Example (TypeScript)
const response = await fetch(
`${API_BASE_URL}/client/v1/app-version?platform=${platform}¤tVersion=${appVersion}`
);
const data = await response.json();
if (data.updateRequired) {
if (data.forceUpdate) {
showForceUpdateScreen(); // blocks the app
} else {
showOptionalUpdateDialog(); // dismissible
}
}
Admin: Setting Version Requirements
Admins update version requirements per platform via:
PUT /admin/v1/app-version
Request body:
{
"platform": 0,
"minimumVersion": "2.1.0",
"forceUpdate": true
}
This sets the minimum required version for the given platform. If forceUpdate is true, any client below that version will be forced to update.