Vodlix
  • Introduction
  • Requirements
    • Installation and Setup Guide for Vodlix
  • User Manual
    • Front End
      • Signup
      • Login
      • Profile Selection
      • Homepage
      • Movies
      • TV Shows
      • Recently Added
      • My List
      • Watch Movie
      • Watch Series
      • Search
      • Choose Plan
      • Account Settings
      • Log Out
    • Admin Area
      • How to Access Admin Area
      • Login In Admin Area
      • Dashboard
      • Settings
        • Website Configuration
          • Website Settings
            • Custom Domain settings
            • Website Title
            • Website Slogans
            • Player Branding URL
            • Default Country
            • Date Format
            • Timezone
            • Blocked Countries
            • Meta Description
            • Google Analytics ID
            • Email Settings
            • Video Settings
            • Channels and Photos
            • Playlist and Series
            • General Settings
            • Comments Settings
          • User Settings and Registeration
            • Turn on Registration
            • Email Verification
            • Minimum age after Registeration
          • Display and Listing Settings
            • Movies Listing
            • Series Listing
          • Uploading and Conversion Settings
            • Upload Options
            • Stay MP4 as it is
            • Stream Via
            • Server Path for Modules
            • Set Video Resolution Generation
            • Allowed Extensions
            • Video Upload form Settings
            • Thumbs Settings
            • Video Conversion Settings
        • Branding
        • Menu Manager
        • Email settings
          • Email settings
          • Email Template Settings
        • Language Settings
          • Edit Language Phrases
          • Add New Phrases
        • Global Announcement
        • Billing & Payments
      • Subscription Management
        • Manage Subscribers
        • Manage Packages
        • Creating a new subscription package
        • Linking Subscription plans with Payment Gateways
        • Promotions and Discounts
      • Content Management
        • Content Ingestion
          • Uploading a Movie
          • Uploading A Series
            • Create a new series
            • Upload a new episode to a series
          • Embedding Video
          • How to put a live streaming link
        • Manage Videos/Content
          • Edit Video
          • Watch
          • Activate/Deactivate a video
          • Make it featured
          • Reconvert the video
          • File conversion details
          • Delete
          • Add movies to editor's pick
          • Apply Ad
          • URL Macro Variables Guide
        • Series and Seasons
          • Difference between Movies and TV Shows
          • How to create Series and Season
          • Add New Series
          • Add New Season
          • Adding Content in Series
          • Publishing and UnPublishing Content
        • Artist Manager
        • Manage Content Categories
        • Editor's Pick
        • Manage Pages
        • Mass Upload Videos
        • List Inactive Videos
        • Notification Settings
      • User Management
      • Ads Management
        • Ads Manager
          • Add Player Ad
          • Manage Ads
        • Manage Pages
      • Stats & Reports
        • Analytics
        • Reports
        • Invoice
      • Tool Box
      • Plugin Manager
      • Templates and Players
        • Template Manager
        • Templates Editor
        • Player Manager
        • Players Settings
    • Monetization
      • Selecting Business Model for Videos
        • Make Video AVOD
        • Make Video TVOD
        • Make Video SVOD
        • How to set custom monetization model for a video
      • Selecting Business Model for Series
  • Developer Guide
    • API Documentation
      • Guidelines for Session Initialization
      • Guidelines for Implementing Stats
      • Device Management
        • Add Device
        • Update Device Activity
        • Device Check
      • Kick / Logout User
      • Get User Device Activity
  • Installation & Setup
    • Server Configuration
      • System Rrequirements
    • DRM Configuration
      • FPS Deployment Package Guide
Powered by GitBook
On this page

Was this helpful?

  1. Developer Guide
  2. API Documentation
  3. Device Management

Update Device Activity

This API is used to update the device activity.

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 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, avoid unnecessary interruptions or error messages for non-banned devices.

Furthermore, to maintain an uninterrupted user experience, verifying that the device has an active internet connection is recommended 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_activity

Request

  • Method: POST

Parameters

Parameter
Type
Description

mac_address

String

Required. The unique identifier of the device.

content_id

Integer

Required for some screens. The ID of the content that is currently being displayed or played on the device.

content_type

Integer

Required for some screens. The type of the content that is currently being displayed or played on the device.

current_screen

String

Required. The current screen of the device. This value must be one of the predefined values.

Here are the accepted current_screen values, their respective requirements for content_id and content_type, when to trigger the endpoint, and the possible content_type values:

Current Screen
Content ID & Type Required
When to Trigger

home

No

When the user is on the home screen

content_info

Yes

When the user is viewing the information about a specific content (movie, series, etc.)

livetv

Yes

When the user is viewing live TV

epg

Yes

When the user is viewing the Electronic Program Guide (EPG)

content_list

No

When the goes to content list in left menu or clicks on view all

content_list_group

Yes

When the goes to content list group in left menu

search

No

When the user is in the search screen

my_list

No

When the user is viewing their personal list of contents

help

No

When the user is on the help screen

player

Yes

When the user is playing a specific content (movie, series, etc.)

movie_category

Yes

When the user is browsing a movie category

series_category

Yes

When the user is browsing a series category

all_movies

No

When the user is viewing all available movies in spotlight

all_series

No

When the user is viewing all available series in spotlight

content_type values:

Value
Label

1

Movie

2

Series

3

Episode

4

Live

5

Trailer

8

Category

13

Content List Group

Usage Example

{
    "mac_address": "A1B2C3D4E5F6",
    "content_id": 2018,
    "content_type": 1,
    "current_screen": "movie_player"
}

Success Response

  • Status: 200

  • Description: Indicates that the device activity was updated successfully.

  • Body: The response body contains the updated device activity details in JSON format.

{
    "status": 200,
    "timestamp": 1684581679,
    "time": 0.598,
    "ip": "127.0.0.1",
    "message": "Success",
    "data": {...}
}

Error Response

  • Status: 400

  • Description: Indicates an error occurred during the device activity update.

  • Body: The response body provides information about the specific error that occurred.

Device Not Found

If you receive the error code device_not_found, make the "add device" call first.

{
    "status": 400,
    "timestamp": 1684581704,
    "time": 0.56,
    "ip": "127.0.0.1",
    "message": "Device not found",
    "error_code": "device_not_found",
    "data": []
}
PreviousAdd DeviceNextDevice Check

Last updated 1 year ago

Was this helpful?