Overview
Leaf Link widgets let your users connect their provider accounts directly from your application. To use them, you need:- An API key scoped to a Leaf user for widget authentication.
- Provider app registrations so Leaf knows which provider credentials to use during the OAuth flow.
https://api.withleaf.io/services/usermanagement/api
API Keys
API keys authenticate Leaf Link widget sessions for a specific Leaf user.Endpoints
Get all API keys
GET /api-keys
Returns every API key associated with a Leaf user.
Parameters
Response
Create an API key
POST /api-keys
Creates a new API key for widget authentication.
Request body
Response
Revoke an API key
DELETE /api-keys/{apiKeyId}
Permanently revokes an API key. This action cannot be undone.
Path parameters
Provider App Information
Register your provider application credentials so Leaf Link widgets can initiate the OAuth flow on behalf of your users. All providers support the same CRUD operations, but the path shape differs depending on whether the provider uses aclientEnvironment.
Endpoint pattern
Providers withoutclientEnvironment use this pattern:
For CNHI, CNHI FieldOps, and John Deere, the provider-specific endpoint pattern is:
GET /app-keys/{Provider}GET /app-keys/{Provider}/{appName}/{clientEnvironment}POST /app-keys/{Provider}/{appName}/{clientEnvironment}PUT /app-keys/{Provider}/{appName}/{clientEnvironment}DELETE /app-keys/{Provider}/{appName}/{clientEnvironment}
STAGE or PRODUCTION.Supported providers and request body fields
Example: John Deere
The examples below show the full CRUD lifecycle for John Deere. All other providers follow the same pattern — only the path segment and request body fields differ.Create a John Deere app
POST /app-keys/JohnDeere/{appName}/{clientEnvironment}
Get all John Deere apps
GET /app-keys/JohnDeere
Get a John Deere app by name
GET /app-keys/JohnDeere/{appName}/{clientEnvironment}
Update a John Deere app
PUT /app-keys/JohnDeere/{appName}/{clientEnvironment}
Delete a John Deere app
DELETE /app-keys/JohnDeere/{appName}/{clientEnvironment}

