NEW FlightHub 2 OpenAPI V1.0
  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
  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:
Next
Query FlightHub 2 system status
Built with