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

Add Device

This API is responsible for adding a new device.

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

Request

  • Method: POST

Parameters

The function expects the following parameters to be included in the request's body:

  • mac_address: The MAC address of the device.

  • device_os: The operating system of the device.

  • device_version: The version of the device.

  • device_type: The type of the device.

  • app_version: The version of the application.

  • app_name: The name of the application.

Success Response

  • Status: 200

  • Description: Indicates that the device was added successfully.

  • Body: The response body contains the details of the added device in JSON format.

{
    "status": 200,
    "timestamp": 1684581841,
    "time": 0.583,
    "ip": "127.0.0.1",
    "message": "Success",
    "data": {
        "mac_address": "A1B2C3D4E5F6",
        "status": 1,
        "ban_status": 0
    }
}

Error Response

  • Status: 400

  • Description: Indicates an error occurred during the device addition process.

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

Usage Example

{
    "mac_address": "A1B2C3D4E5F6",
    "device_os": "iOS",
    "device_version": "14.5",
    "device_type": "Mobile",
    "app_version": "2.0",
    "app_name": "MyApp"
}

Notes

  • If the mac_address provided already exists in the system, the device will be updated with the new information.

  • If any of the required parameters (device_os, device_version, device_type, mac_address, app_version, app_name) are missing or empty, the API will return a 400 status with an appropriate error message.

Please note that the provided code snippet represents a simplified version of the add_device function. Additional logic and error handling may exist in the actual implementation.

PreviousDevice ManagementNextUpdate Device Activity

Last updated 1 year ago

Was this helpful?