Device Check
The Device Check API is used to perform a device check. It is recommended to send this request every 5 minutes to ensure the device's status is up-to-date.
Important Note:
If the value of device_management
is set to 1, which means that the system is enabled. This configuration is obtained from the server at the endpoint /api/base/configs
. The system will remain enabled until you explicitly disable it.
On the other hand, if the value of device_management
is anything other than 1, the system is considered disabled.
To provide a seamless user experience, it is essential to handle the error message display only when the device_banned
status code is received. In all other cases, no error code should impact the user experience. Prioritizing a smooth user interaction, ensure that unnecessary interruptions or error messages for non-banned devices are avoided.
Furthermore, to maintain an uninterrupted user experience, it is recommended to verify that the device has an active internet connection before sending these requests. If the internet is not connected, refrain from sending these requests to prevent any adverse effects on the user experience.
API Route
{{apiBase}}/v2/device_check
Request
Method: POST
Parameters
The API expects the following parameter to be included in the request's body:
mac_address
: The MAC address of the device.
Success Response
Status: 200
Description: Indicates a successful device check.
Body: The response body contains information about the device check.
Error Response
Status: 400
Description: Indicates an error occurred during the device check.
Body: The response body provides information about the specific error that occurred.
Device Banned
If you receive the error code device_banned
, display a black screen with the error message.
Device Not Found
If you receive the error code device_not_found
, make the "add device" call first.
Usage Example
Notes
The
mac_address
parameter is used to identify the device to be checked.If the
mac_address
matches an existing device, the API will return a200
status with information about the device.If the
mac_address
does not match any existing device, the API will return a400
status with an appropriate error message.Additional error handling or logic may be present in the actual implementation.
Last updated