Leaf connects to Climate FieldView using OAuth 2.0. Once connected, Leaf syncs farms, fields, machine files, and field operations for the Leaf user. Climate FieldView does not have a grower-level hierarchy, so data syncs at the farm and field level.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 Climate FieldView developer account. Become a partner.
- Your application’s
clientId,clientSecret, andapiKeyfrom Climate FieldView. - A grower’s
refreshTokenobtained through the Climate FieldView OAuth 2.0 consent flow.
Setup steps
- Complete the Climate FieldView OAuth 2.0 flow to obtain a
refreshTokenfor the grower’s account. - POST the credentials to Leaf:
- Leaf validates the token and begins syncing. Check credential status with
GET /users/{leafUserId}/climate-field-view-credentials.
Credentials schema
Create request body:| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your application’s client ID from Climate FieldView |
clientSecret | string | Yes | Your application’s client secret |
apiKey | string | Yes | Your application’s API key |
refreshToken | string | Yes | The grower’s OAuth refresh token |
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
| Action | Method | Path |
|---|---|---|
| Get credentials | GET | /users/{leafUserId}/climate-field-view-credentials |
| Create credentials | POST | /users/{leafUserId}/climate-field-view-credentials |
| Delete credentials | DELETE | /users/{leafUserId}/climate-field-view-credentials |
| Get credential events | GET | /users/{leafUserId}/climate-field-view-credentials/events |
Troubleshooting
Use the events endpoint to inspect credential health:- Status changes to invalid: The grower may have revoked access in Climate FieldView, or the refresh token expired. Have the grower re-authorize.
- No grower hierarchy: Climate FieldView does not expose a grower level in its FMIS structure. Data is organized by farms and fields only.
What to do next
- Connect Climate FieldView Tutorial — Step-by-step walkthrough.
- Provider Authentication Overview — How provider credentials work across all providers.
- API Reference: Providers — Full endpoint reference for provider credentials.

