Using the Grid API directly requires advanced configurations. Grid SDK is
the recommended way to authenticate accounts. It handles authentication, key
management, automatic failover, and transaction signing. Learn more about the
Grid SDK in the Grid SDK guide.
This endpoint is for authenticating existing Grid Accounts. For new account
creation, use the Create
Account endpoint
followed by account verification.
Authentication Flow
- Request OTP: Call Initiate Authentication with email address
- Generate HPKE Keypair: Create client-side HPKE keys using P-256 curve while waiting for OTP
- Verify OTP: Use this endpoint to verify the received OTP code with HPKE public key
- Use Credentials: Utilize returned authentication tokens for API access
OTP Limits
- Attempts: Maximum 3 verification attempts per OTP
- Expiration: 15-minute window from OTP generation
- Retry: Must request new OTP if limits exceeded
Required Configuration
When using Privy as the authentication provider (default), you must include akms_provider_config with your HPKE public key to receive encrypted authorization keys. This enables secure transaction signing for your Grid Account.
Complete Implementation Guide
For comprehensive implementation details including:- kms_provider_config creation
- HPKE keypair generation with P-256 curve and DER formatting
- Authorization key decryption using ECDH + HKDF + ChaCha20-Poly1305
- Transaction payload signing with JSON canonicalization
- Error handling and security best practices
- Language-agnostic examples
Response Data
Upon successful verification, you receive:- Authentication tokens for API access
- Account information including Grid Account address
- Session credentials for subsequent API calls
Authorizations
Your Grid API key from the Grid Dashboard
Body
application/json