Skip to main content
PTx/AGCO is retiring the Trimble Agriculture API. For a new integration, use FarmEngage. Existing Trimble connections continue to work until PTx turns off that API. To move existing connections, see Migrate from Trimble to FarmEngage.
Leaf connects to Trimble Agriculture using OAuth 2.0. Once connected, Leaf syncs growers, farms, fields, machine files, and field operations for the Leaf user.

Prerequisites

  1. A Trimble Agriculture developer account. Register here.
  2. Your application’s clientId and clientSecret from Trimble.
  3. A grower’s refreshToken obtained through the Trimble OAuth 2.0 consent flow.

Setup steps

  1. Complete the Trimble OAuth 2.0 flow to obtain a refreshToken for the grower’s account.
  2. POST the credentials to Leaf:
  1. Leaf validates the token and begins syncing. Check credential status with GET /users/{leafUserId}/trimble-credentials.

Credentials schema

Create request body: Response:

Endpoints

Base URL: https://api.withleaf.io/services/usermanagement/api

Troubleshooting

Use the events endpoint to inspect credential health:
Event logs are retained for 30 days. Once the credential is deleted or disassociated from the Leaf user, the logs are no longer available.
Common issues:
  • Status changes to invalid: The grower may have revoked access or the refresh token expired. Have the grower re-authorize through Trimble’s OAuth flow.

What to do next

Last modified on November 5, 2026