Authentication Flow
1
Install SDK
Install the Rise SDK package
2
Configure Authentication
Set up SDK with Rise ID and private key or JWT token
3
Automatic Authentication
SDK handles SIWE signing and JWT token management
4
API Access
Execute API calls with automatic authentication
SDK Installation
First, install the Rise SDK:Complete Integration Example
Authentication Methods
Method 1: Rise ID Authentication (Recommended)
Use your Rise ID and wallet private key for automatic authentication:- Automatic JWT generation - SDK handles SIWE signing and JWT token creation
- Token renewal - SDK automatically refreshes expired tokens
- Full API access - Access to all API endpoints including sensitive operations
- Simplified integration - No manual authentication code required
Method 2: JWT Authentication
Use a pre-generated JWT token for direct API access:- Existing JWT tokens - When you already have a valid JWT token
- Read-only operations - For applications that only need to read data
- Simple integrations - When you don’t need sensitive write operations
Error Handling
The SDK provides comprehensive error handling with descriptive error messages:Error Message | Description | Solution |
---|---|---|
Failed to generate JWT token | JWT generation failed | Check Rise ID and private key |
Rise ID and private key are required | Missing credentials | Provide both Rise ID and private key |
Invalid Rise ID address | Rise ID format is invalid | Verify Rise ID format (0x + 40 hex chars) |
Private key should be a valid hex string | Private key format is invalid | Check private key format (0x + 64 hex chars) |
HTTP 401 | Authentication failed | SDK automatically handles JWT refresh |
HTTP 403 | Insufficient permissions | Check user roles and permissions |
Security Best Practices
Never expose private keys in client-side code or commit them to version control.
Secondary Wallets
Error Logging
Troubleshooting
Common Issues
-
“Authentication failed”
- Verify Rise ID and private key are correct
- Ensure wallet has sufficient funds for gas fees
- Check network connectivity
-
“JWT token expired”
- SDK automatically handles token renewal
- If issues persist, reinitialize the client
-
“Insufficient permissions”
- Check user roles and permissions
- Verify team membership for team-specific operations
-
“Network error”
- Check internet connection
- Verify API endpoint is accessible
- Check firewall settings
Next Steps
Payment Integration
Learn how to process payments with automatic authentication
Team Management
Manage teams and permissions with the SDK
Webhooks
Set up real-time notifications for your integration
Error Handling
Comprehensive error handling and troubleshooting
Need help? See the Authentication page for detailed documentation or contact support at Hello@Riseworks.io