Prerequisites
- Access to an Agvance instance with API access enabled.
- Your
apiKeyfrom Agvance. - The
username,password, anddatabaseIdfor the target Agvance database. - Optional:
clientEnvironmentif you need to override the default environment.
Setup steps
POST the credentials to Leaf:Credentials schema
Create request body:
Response:
sessionId after successful authentication. If you omit clientEnvironment, Leaf defaults it to STAGE.
Confirm the credentials are attached
Check the stored credentials for the Leaf user:sessionId.
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
Troubleshooting
Use the events endpoint to inspect credential health:- Invalid credentials: If the password changes in Agvance, delete and recreate the credentials with the new password.
- Wrong database ID: Verify the
databaseIdmatches the target Agvance database. - STAGE vs. PRODUCTION mismatch: If you set
clientEnvironmentexplicitly, make sure it matches the Agvance instance you’re connecting to.
What to do next
- Growers for how Agvance grower and farm data appears in Leaf.
- Fields Overview for the synced resource hierarchy.
- Provider Credentials API Reference for the credential path matrix.

