Overview
The Aries API uses OAuth2 with Bearer tokens (JWT format) for authentication. All API requests require a valid access token in the Authorization header.Authentication Flow
1. OAuth2 Client Credentials
First, obtain your OAuth2 credentials from the Aries platform:- Client ID: Your application identifier
- Client Secret: Your application secret key
2. Initialize the SDK
OAuth2 Authorization Flow
Authorization Code Flow
For applications that need user authorization:PKCE Support
For enhanced security in public clients:MFA Verification
If MFA is enabled:Token Management
Refreshing Access Tokens
Automatic Token Refresh
Using Bearer Tokens Directly
If you already have an access token:Security Best Practices
1. Store Credentials Securely
Never hardcode credentials:2. Use Environment Variables
Set environment variables:3. Handle Token Expiration
4. Context Support
When the SDK exposes*WithContext helpers, pass context.Context for cancellation and deadlines. Otherwise, wrap outbound calls with your own timeouts at the HTTP layer.
OAuth2 Scopes
Available scopes:read- Read account data, positions, and orderstrade- Place and cancel orderswithdraw- Withdraw funds from accountadmin- Administrative operations
Error Handling
Complete Example
Next Steps
- Quick Start Guide - Get started with basic operations
- Users API - Manage user accounts and profiles
- Orders API - Place and manage trades