LogoLogo
What's New?Connect Agent ReleasesBook a DemoPricing
  • Documentation
  • Developers
  • Administration
  • API Reference
    • Connect API Reference
      • Devices
      • Deployments
      • Device Files
      • Port Tunneling
      • API Reference v1 (Legacy)
        • Device state
        • Bulk devices state
        • Get devices details
        • Change devices details
        • Deploy Update
        • Update Trigger
        • Tags
        • Apps
    • Create Access Token
  • GitHub Action
    • Deploy Device Update
Powered by GitBook
On this page
  • Data Format
  • User Token
  • Device Token

Was this helpful?

Export as PDF
  1. API Reference
  2. Connect API Reference

API Reference v1 (Legacy)

Each device can send up to three API calls in a minute. If you reach the limit, you will receive an appropriate response code. Please check the response codes and send no more calls than the limit. Otherwise, your device may get banned for API calls. All calls require a user_token and some of them require a device_token.

Token retrievals might have slight differences between agent versions. We strongly recommend upgrading the Agent to the latest version available.

Data Format

  • Endpoint payload data is in JSON format.

  • Input parameters in Connect, such as project name, group, device, access tokens, etc., are case sensitive.

User Token

The user_token can be found in the Settings category on Connect dashboard under your account.

Device Token

Devices with agent 5.4 and above, run the agent with the flag --print-token to receive the device token: /etc/connect/service/ConnectAgent --print-token

Here's a ready-to-use script to grab the device token:

import subprocess

CONNECT_AGENT_PATH = "/etc/connect/service/ConnectAgent"
AGENT_FLAG_TO_GET_DEVICE_TOKEN = "--print-token"
 
user_token = "Your user token can be found in the Connect UI"
device_token = subprocess.check_output(CONNECT_AGENT_PATH + ” ” + AGENT_FLAG_TO_GET_DEVICE_TOKEN, shell=True)
#! /bin/bash
/etc/connect/service/ConnectAgent --print-token

Devices with agent 5.3 and below, device_token can be found in the file /etc/connect/service/settings.json

PreviousPort TunnelingNextDevice state

Was this helpful?