Authentication for Connected Accounts
Understanding Connected Accounts
{
"id": "acc-52a220de-73e9-11ee-8cc3-0242ac130002",
"account_email": "[email protected]",
"embedded_url": "https://embed.graniot.com/?auth_id=eyJ...",
"account_access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}Option 1: API Key + Account Header (Backend)
Headers
x-api-key: YOUR_API_KEY
Graniot-Account: acc-52a220de-73e9-11ee-8cc3-0242ac130002Characteristics
Example: Create a Farm for a Connected Account
Option 2: JWT Bearer Token (Frontend/Embedded)
Headers
Characteristics
Example: Fetch Parcels for a Connected Account
Refreshing the Token
Comparison
Feature
API Key + Header
JWT Bearer
Security Best Practices
Common Errors
"Invalid token"
"Account not found"
Last updated