1. authentication
NEW FlightHub 2 OpenAPI V1.0
  • Root Directory
    • authentication
      • Authentication Tutorial
    • System Service
      • Query FlightHub 2 system status
    • Organize Projects
      • Organize Project Tutorial
      • Get the list of projects under the organization
      • Get the list of devices under the organization
      • Obtain the list of devices under the project
      • Obtain storage upload credentials for the project
      • Add personnel to the project
    • Device Management
      • Device Management Tutorial
      • Device Model Retrieval
      • HMS Information Retrieval
      • Real-time control command distribution
      • Dock camera switch
      • Aircraft Lens Switching
      • Control acquisition
      • Release control
      • Video transmission clarity settings
      • Custom Network RTK Calibration
    • Livestream Management
      • Livestream Management Tutorial
      • Livestream Push
        • Start livestream
      • Bypass Streaming
        • Stream forwarding error code
        • Create Stream Forwarder
        • Enable/Disable stream forwarder
        • Get stream transcoder list
        • Delete stream forwarder
    • Task Management
      • Task Management Tutorial
      • Create Flight Task
      • Updated flight task status
      • Obtain flight task list
      • Obtain media resources generated by the Flight task
      • Obtain Flight task trajectory information
      • Obtain Flight task information
    • Flight Route Management
      • Flight Route Management Tutorial
      • Flight Route Upload Completion Notification
      • Get the list of flight routes under the project
      • Get flight route details
    • Model Management
      • Model Management Tutorial
      • Model reconstruction coordinate system
      • Get the list of models under the project
      • Get Model Details
      • Model reconstruction
    • Annotation Management
      • Annotation Management Tutorial
      • Create map annotation
    • Open modeling
      • Open modeling tutorial
      • Model Reconstruction Error Code
      • Release Notes
      • Algorithm parameter introduction
      • Get resource details
      • Get Details of Models Currently Being Reconstructed
      • Get upload credential
      • Upload callback
      • Delete resource
      • Start reconstruction task
      • Stop reconstruction task
      • Get the Model Details
      • Delete Models
  • Schemas
    • 默认目录
      • 公共结构
    • 硬件设备
    • 实时应用
    • real-time application
    • Root Table of Contents
      • Default Table of Contents
        • Public Structure
      • Hardware device
        • Dock 3
        • Matrice 4D Series
        • Dock 1
        • Matrice 30 Series
        • Dock 2
        • Matrice 3D Series
        • DJI RC Plus 2
        • Mavic 3 Enterprise Series
        • DJI RC Pro Enterprise
        • Matrice 300 RTK
        • Matrice 350 RTK
        • Matrice 4 Series
        • DJI Smart Controller Enterprise
        • DJI RC Plus
      • 实时应用
      • real-time application
        • schema_option_rmtp
        • schema_option_gb28181
        • task_repeat_option_relative_monthly
        • task_repeat_option_absolute_monthly
        • task_repeat_option_weekly
        • task_repeat_option_daily
  1. authentication

Authentication Tutorial

Feature Introduction#

The authentication function is mainly used to ensure the security of the API and to implement access control for FlightHub 2.
Authentication is the process of verifying a user's identity. OpenAPI authenticates by passing the X-User-Token in the Header parameter of an HTTPS request.
Authorization refers to the process of determining whether a user has permission to access specific resources after authentication is successful. FlightHub 2 will authorize based on the provided X-User-Token and X-Project-Uuid. Please ensure that the user corresponding to the X-User-Token has the project permissions to access the project normally.
Note: X-User-Token is a JWT token. You can use a JWT Decoder to parse the user infomation corresponding to the token. If authorization fails, please check on lightHub 2 whether the user has the permissions for the project being accessed.
JWT token example:
image.png

Interface Usage Process#

Please refer to the following sequence diagram to obtain the user token and project UUID offline. Pass the X-User-Token and X-Project-Uuid into the Header parameter of the OpenAPI interface to communicate with FlightHub 2.
The current X-User-Token for FlightHub 2 is the organization key for FlightHub Sync. The path to obtain the organization key is as follows: FlightHub 2 -> My Organization -> Organization Settings -> FlightHub Sync -> Organization Key.
image.png
The X-Project-Uuid can be obtained from the data.list.uuid in the project list interface under the organization.
Taking adding personnel to a project as an example:
Modified at 2025-02-24 12:42:59
Next
Query FlightHub 2 system status
Built with