Leaf connects to Precision Planting Panorama using OAuth 2.0 via AWS Cognito. Once connected, Leaf syncs growers, farms, fields, machine files, and field operations.Documentation Index
Fetch the complete documentation index at: https://docs.withleaf.io/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Precision Planting Panorama developer/partner account.
- Your application’s
clientIdfrom the Panorama developer portal. - The partner’s
usernameandpasswordfrom your Panorama account. - A
refreshTokenobtained through the Cognito authentication flow, or use the one-click integration endpoint which handles this for you. - The grower’s organizationCode, pre-authorized to share data with your Panorama partner application (manual credential creation only).
Setup steps
Option A: One-click integration (recommended) Use the one-click integration endpoint, which handles the Cognito token exchange automatically:organizationCodeis not requried for the one-click flow.- Set the
sharingUrlIdin both the one-click request body and your Panorama app key configuration. - Set the Sharing Confirmation URL to
https://widget.withleaf.ioin the Panorama Partner Portal so Leaf can receive the callback and complete credential attachment. - The
sharingUrlIdis the UUID contained in the Share Initiation URL and can be obtained through the Panorama Partner Portal under the Account Details tab.

Confirm the credentials are attached
Check the stored credentials for the Leaf user:Credentials schema
Create request body:| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your application’s client ID from Panorama |
username | string | Yes | The partner’s Panorama username |
password | string | Yes | The partner’s Panorama password |
organizationCode | string | Yes | The grower’s organization code in Panorama |
refreshToken | string | Yes | Cognito refresh token |
clientEnvironment | string | Yes | STAGE or PRODUCTION |
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
| Action | Method | Path |
|---|---|---|
| Get credentials | GET | /users/{leafUserId}/panorama-credentials |
| Create credentials | POST | /users/{leafUserId}/panorama-credentials |
| Delete credentials | DELETE | /users/{leafUserId}/panorama-credentials |
| Get credential events | GET | /users/{leafUserId}/panorama-credentials/events |
Troubleshooting
Use the events endpoint to inspect credential health:- Cognito token expiry: Panorama uses AWS Cognito for auth. If the credential becomes invalid, the grower may need to re-authenticate. Using the one-click integration endpoint avoids much of this complexity.
- Wrong organization code: For manual credential creation, verify the
organizationCodeis already authorized to share data with your Panorama partner application. - STAGE vs. PRODUCTION mismatch: Make sure
clientEnvironmentmatches your Panorama setup.
What to do next
- Field Operations Quickstart for checking synced field and operation data.
- Provider Organizations if you need to review sync scope after connection.
- Provider Credentials API Reference for the credential path matrix.

