Understanding Authorization Queries
Authorization queries allow you to paginate through approvals granted by a single address. This reveals:
- Approved projects (DApps, protocols, or services)
- Specific assets authorized per project
- Approval amounts for each token
👉 Master Web3 wallet security with our advanced API
API Endpoint Structure
POST https://web3.okx.com/api/v5/wallet/security/approvalsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| addressList | Array | Yes | List of addresses (max 20) |
| chainIndex | String | Yes | Blockchain identifier |
| address | String | Yes | Wallet address |
| limit | String | No | Results per page (default 50, max 100) |
| cursor | String | No | Pagination cursor |
Response Data
| Field | Type | Description |
|---|---|---|
| chainIndex | String | Blockchain identifier |
| cursor | String | Pagination token |
| approvalProjects | Array | Authorized projects list |
| projectName | String | DApp/protocol name |
| projectIcon | String | Logo URL |
| approveAddress | String | Contract address |
| tokens | Array | Approved assets |
| imageUrl | String | Token icon |
| symbol | String | Token ticker |
| status | String | Authorization state (1=active, 2=canceling, 3=pending) |
| tokenAddress | String | Token contract |
| approvalNum | String | Approved amount (actual amount = value / 10^decimals) |
Key Use Cases
- Security audits - Monitor all active token approvals
- Portfolio management - Track decentralized asset permissions
- Risk mitigation - Identify excessive or suspicious approvals
👉 Optimize your Web3 workflow with our developer tools
FAQ
How often should I check authorizations?
We recommend monthly audits for active wallets, especially after interacting with new DApps.
What's the difference between approvalNum and actual amount?
The approvalNum represents the raw blockchain value. Divide by 10^token decimals for human-readable amounts.
Can I revoke authorizations through this API?
While this endpoint only queries data, our full API suite includes authorization management capabilities.
Why limit to 20 addresses per request?
This ensures optimal performance while maintaining comprehensive data coverage for most use cases.
Best Practices
- Implement regular authorization checks
- Set reasonable approval limits
- Revoke unused permissions
- Monitor for unexpected changes
This comprehensive approach ensures secure Web3 wallet management while maintaining full control over your digital assets.