Third-Party System Integration

Open a connection link from a third-party system to create an access token or add a Webhook for one project.

IoT Platform integration

Before You Approve

  • Access token. An organization owner can grant access to one project. Tokens expire after one year (365 days) by default. A read-only token can read project data. An operator token can also run permitted controls. Check the token name, project, role, expiration and receiving address.
  • Webhook. A manager with access to the project or an organization owner can send project data to an HTTPS endpoint. Check the destination, when data is sent, and whether device heartbeats are included.

Approve only when you recognize the receiving address and intend to share the token or project data with it.

Choose a Project and Confirm

Open the connection link on the third-party site and sign in. The authorization dialog opens on the YenGear home page.

  1. Review request. Check the recipient and the requested operation, then choose Next.
  2. Choose project. Select your organization and project, then choose Next.
  3. Confirm authorization. Review the project, role, token validity and recipient, then chooseConfirm and create token. For a Webhook, review the delivery endpoint and send conditions, then chooseAdd webhook.

Choose Cancel to return to the requesting site before creating anything.

After creation, choose Return to requesting site (new tab). The requesting site opens in a new tab. The current YenGear tab opens the organization’s access token settings or the project’s webhook settings.

Check the Connection

  • Access token. In Organization Settings → Access Tokens, check the token name, project scope, role and expiration. Run a read-only request from the third-party system to verify access. Disable or delete the token when the system no longer needs it.
  • Webhook. In Project → Data → Webhook, check the destination and enabled status. After the gateway syncs, have a device report data that meets the send conditions. Check for the request in the receiving system. Disable or remove the Webhook to stop delivery.

If the third-party page shows no result, check the saved configuration in YenGear before opening a new connection link.

Generate a Connection Link

Use URLSearchParams to encode the request object in a single request parameter.

const requestState = crypto.randomUUID()
const url = new URL('https://cloud.yengear.com/connect')
url.searchParams.set('request', JSON.stringify({
  action: 'access_token.create',
  params: { name: 'Equipment dashboard', role: 'readonly' },
  return_url: 'https://partner.example/yengear/callback',
  state: requestState,
}))

Set params.role to readonly or operator. Leave params.valid_days out to use the one-year default, or specify 1 to 365 days. The dialog shows the requested role and validity before confirmation.

To add a Webhook, set action to webhook.create and use a publicly reachable HTTPS endpoint inparams.

{
  url: 'https://partner.example/hooks/yengear',
  only_on_change: true,
  push_heartbeat: false,
}

Generate a random state for each link and associate it with the connection request on your site. Accept an HTTPS form POST with content type application/x-www-form-urlencoded. Verify and consume stateonce. Use it to look up the connection request because browsers may omit your session cookie on a cross-site POST.

Every callback includes action and state. The remaining fields depend on the result.

  • Token created. status=success, project_id, access_token, expires_at.
  • Webhook added. status=success, project_id, webhook_id.
  • Cancelled. status=cancelled.

Store the token on the server and keep the callback’s access_token out of application logs.

Open API reference