Frequently Asked Question

Trigger an ONVIF Motion Event from Your Own Program (API)
Last Updated 20 hours ago

Use this API when your own application needs to send a motion event to an NVR/VMS. For automatic keyboard or mouse events, see Send Motion Events to the NVR/VMS When the PC Is Used.

Enable API calls

  1. In DeskCamera, click Stop.

  2. Open Video & Audio Settings and select the required video source.

  3. Set Motion events to Enable.

  4. Click the settings button next to Motion events.

  5. In Configure Motion, set API call to Enable. The API token box appears.

    Configure Motion with API call set to Enable and the API token box under it

  6. Copy the token in the API token box.

  7. Click Close.

  8. Click Start.

Send a motion event

Use an HTTP client such as Postman or your own application. Send a POST request to:

http://192.168.241.1:8090/onvif/event_service/API/TriggerEvent

Replace 192.168.241.1:8090 with the LAN address in the Camera Address column of Started Cameras. This is not the browser management port.

Set the header to Content-Type: application/json. Use this body, replacing the example token with the one you copied:

{
  "token": "DISPLAY1_Token",
  "type": "0",
  "state": "true"
}
  • token: The exact token for the selected source.
  • type: Use 0 for a motion event.
  • state: Use true when motion starts and false when it ends. Send the end event before starting the next one; an NVR/VMS may ignore repeated events with the same state.

Example motion-event POST request in Postman

Remote Desktop screens

Each remote screen, such as RDPDisplay or RDPDisplay2, has its own token. Copy it from that screen's Configure Motion window.

See Use DeskCamera with Remote Desktop for screen setup and approval.

Please Wait!

Please wait... it will take a second!