Overview
Graine AI uses secure authentication to protect your account and data. We support multiple authentication methods for different use cases.Web Platform Authentication
Sign Up
- Visit https://graine.ai
- Click “Sign Up”
- Choose your sign-up method:
- Email/Password
- Google OAuth
- GitHub OAuth (coming soon)
Email/Password Sign Up
You’ll receive a verification email. Click the link to activate your account.
Login
- Visit https://graine.ai
- Click “Log In”
- Enter your credentials
- Click “Sign In”
Password Reset
If you forget your password:- Click “Forgot Password” on the login page
- Enter your email address
- Check your email for reset link
- Create a new password
API Authentication
Getting Your API Token
Using Your API Token
Include your API token in the Authorization header:Session Management
Session Duration
- Web Sessions: 7 days (with auto-refresh)
- API Tokens: No expiration (can be revoked manually)
Security Features
Automatic Logout
Sessions expire after 7 days of inactivity
Secure Cookies
HttpOnly cookies prevent XSS attacks
HTTPS Only
All traffic encrypted with TLS 1.3
Token Rotation
Rotate API keys regularly for security
Organization Access
Understanding Organizations
- Each user belongs to one organization
- Organization ID is automatically assigned
- All resources (agents, campaigns, etc.) are scoped to your organization
Getting Your Organization ID
Your organization ID is displayed in:- Dashboard header
- Settings page
- API responses
Best Practices
API Key Security
Never commit API keys to version control
Never commit API keys to version control
❌ Don’t do this:✅ Do this:
Use environment variables
Use environment variables
Store keys in
.env files: bash GRAINE_API_KEY=your_key_here GRAINE_ORG_ID=your_org_id Rotate keys regularly
Rotate keys regularly
- Rotate API keys every 90 days - Immediately rotate if compromised - Delete unused keys
Use separate keys for different environments
Use separate keys for different environments
- Development:
sk_dev_... - Staging:
sk_staging_... - Production:
sk_live_...
Password Requirements
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- Special characters recommended
Rate Limiting
API requests are rate-limited to ensure fair usage:| Limit Type | Value |
|---|---|
| Requests per minute | 1,000 |
| Requests per hour | 50,000 |
| Requests per day | 1,000,000 |
Rate Limit Headers
Handling Rate Limits
Troubleshooting
Common Auth Issues
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Causes: - Insufficient permissions - Organization mismatch - Resource
belongs to another org Solution: - Contact your admin for permissions -
Verify your organization ID
Email verification not received
Email verification not received
Solution:
- Check spam folder
- Wait 5 minutes and try again
- Click “Resend verification email”
- Contact support if still not received
Security Compliance
Data Protection
- Encryption in Transit: TLS 1.3
- Encryption at Rest: AES-256
- Password Hashing: bcrypt with salt
- Session Security: HttpOnly + Secure + SameSite cookies
Compliance
SOC 2 Type II
Certified for security controls
GDPR
European data protection compliant
HIPAA Ready
Healthcare compliance available
Next Steps
API Reference
Explore API endpoints
Quickstart Guide
Create your first agent
Need Help?
Contact our support team for authentication issues