Leaf connects to Raven using OAuth 2.0 credentials. Once connected, Leaf syncs grower, farm, and field data for the Leaf user. This is separate from Raven Slingshot, which uses API key credentials for machine file ingestion.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 Raven developer account with OAuth application credentials.
- Your application’s
clientIdandclientSecretfrom Raven. - A grower’s
refreshTokenobtained through the Raven OAuth 2.0 consent flow.
Credentials schema
| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your Raven application client ID. |
clientSecret | string | Yes | Your Raven application client secret. |
refreshToken | string | Yes | The grower’s OAuth refresh token. |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /users/{leafUserId}/raven-credentials | Get stored credentials. |
| POST | /users/{leafUserId}/raven-credentials | Create credentials. |
| DELETE | /users/{leafUserId}/raven-credentials | Delete credentials. |
| GET | /users/{leafUserId}/raven-credentials/events | Get credential events for troubleshooting. |
https://api.withleaf.io/services/usermanagement/api
Create credentials
Response
Troubleshooting
Use the events endpoint to check credential health. Events are retained for 30 days and are deleted when the credential is removed.What to do next
- Raven Slingshot for API key-based machine file ingestion.
- API Reference: Providers for the full credential path matrix.

