In this post, we will show you how to go through the Precision Planting Panorama authorization flow with Leaf and get authorized to access your users' Panorama data. Let's get to it!
Note: Magic Link and Leaf Link are not currently available for Panorama. The one-click integration endpoint described below is the way to connect Panorama accounts.
Summary
Step 0: Get your Leaf API credentials.
Step 1: Get your Panorama partner credentials from Precision Planting.
Step 2: Create a Leaf User.
Step 3: Get the Organization Code from the Panorama Portal.
Step 4: Initiate the one-click integration via Leaf's API.
Step 5: Authorize Leaf in the Panorama Portal.
Step 6: Verify data is syncing.
Keep in mind that this tutorial is a full walkthrough. Steps 0, 1, and 2 are one-time setup. Steps 3 through 5 are repeated for each farmer you connect.
Step 0: Get your Leaf API credentials
If you don't already have a Leaf account, register at withleaf.io.
Here is how you get your Leaf access token.
Step 1: Get your Panorama partner credentials
Contact Precision Planting to register as a Panorama partner. You will receive:
- A Client ID
- A Username (your partner email)
- A Password
These are your partner-level credentials — the same set is used for every farmer connection you set up. You will also be given access to the Panorama Partner Portal where you can find API documentation and sample data.
Panorama has two environments:
- Development (STAGE):
bananorama.com/partner.bananorama.com - Production:
panorama.ag/partner.panorama.ag
Use the STAGE environment while building and testing your integration.
Step 2: Create a Leaf User
When you integrate with a provider via Leaf, you need to create a 'Leaf User' to manage provider authentication and organize data for your end users. For Panorama, each Leaf User maps to a single Panorama "operation" (what Panorama calls an operation is equivalent to an organization in other providers).
Here is how you create a Leaf User.
Multiple providers can be attached to the same Leaf User, so you can query data across providers at once.
Step 3: Get the Organization Code from the Panorama Portal
For each farmer you want to connect, you need their Panorama Organization Code. The farmer can find this by:
- Logging into the Panorama Portal (or bananorama.com for STAGE).
- Opening the Main Menu.
- Selecting the Operation they want to share.
- Noting the Organization Code (a short string like
krwv4vYH).
Your application needs a way for the farmer to provide this code — for example, a text input in your connection setup UI.
Warning: The Organization Code grants access to that operation's data. It should be treated as sensitive and not shared publicly.
Step 4: Initiate the one-click integration
With the farmer's Organization Code in hand, call Leaf's one-click integration endpoint:
POST https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/one-click-integration/Panorama
Header:
Authorization: Bearer
Body:
{
"clientId": "your-panorama-client-id",
"username": "your-panorama-partner-email",
"password": "your-panorama-partner-password",
"organizationCode": "the-farmers-org-code",
"clientEnvironment": "STAGE"
}
Set clientEnvironment to STAGE for development or PRODUCTION for live accounts.
Leaf will return a JSON with a signInUrl:
{
"signInUrl": "https://bananorama.com/connections/..."
}
This URL is the Panorama sharing initiation link. You can redirect the farmer to this URL, or instruct them to complete the next step in the Panorama Portal directly.
Warning: The farmer must complete Step 5 within 15 minutes of this call, or the session will expire and you'll need to repeat this step.
Step 5: Authorize Leaf in the Panorama Portal
The farmer needs to enable data sharing with your application in the Panorama Portal:
- Go to the Panorama Portal and select the Operation from Step 3.
- Enter the Manage Operation section.
- Select Data Sharing on the left menu.
- In the Connections section, find the Leaf Integration connection and enable it using the toggle.
This triggers a confirmation request to Leaf's API, completing the sharing handshake. Leaf will then begin syncing data from this operation automatically.
Step 6: Verify data is syncing
You can verify that the credentials are active by calling:
GET https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/panorama-credentials
A status of "ACTIVE" means the connection is working and Leaf is syncing data.
Leaf will fetch operation files (planting, spraying, harvest data in .2020 format) from the connected Panorama operation, convert them, and make them available through the standard Field Operations and Machine File Conversion endpoints.
Leaf manages token refresh and data syncing automatically from this point forward. If the farmer revokes sharing in the Panorama Portal, the credential status will update accordingly.
For more details on the credential endpoints, see the Panorama Credentials reference.