Skip to main content
Leaf Link is a set of drop-in UI widgets that handle two tasks: connecting your users’ provider accounts and uploading machine files. Leaf provides React and Angular packages, with provider availability depending on the package and widget runtime.

Widgets

Leaf Link includes two widgets:
  • Provider Connection lets your users authenticate with CNHi, CNHI FieldOps, John Deere, Trimble, Climate FieldView, AgLeader, Raven Slingshot, Lindsay, and Stara from inside your application.
  • File Upload lets your users drag-and-drop or browse for .zip files containing machine data. Leaf processes these files through the standard conversion pipeline.
Both widgets authenticate using a per-Leaf-user API key (not your API Owner bearer token). Create API keys via the API Key endpoints.

Prerequisites

  1. A Leaf account with at least one Leaf user created.
  2. A Leaf user API key (created via POST /api-keys).
  3. For provider connection: provider app credentials registered with Leaf for each provider you want to enable.

Provider setup

Each provider requires a one-time registration of your application credentials with Leaf. You also need to add https://widget.withleaf.io as a redirect/callback URL in the provider’s developer portal. Register credentials by calling POST /usermanagement/api/app-keys/{Provider}/{appName} with the provider-specific fields.

Installation

React

Provider Connection:
File Upload:

Angular

Provider Connection:
File Upload:

Properties

Provider Connection

File Upload

Hooks

Both widgets expose hooks for tracking widget state in your application.

Provider Connection hooks

Use useLeaf() from @withleaf/leaf-link-react:

File Upload hooks

To use hooks in React, wrap your component tree with the <Leaf> context provider:
In Angular, use the (getWidgetStatus) output binding on the <providers> component.
The Angular package does not currently expose Stara in its provider list.

What to do next

Last modified on May 18, 2026