Project
API Keys
Step 3 of setup: create keys your backend will use
API Key Security
API keys authenticate your application to the Sorted.fund backend.
Keep them secret. Never commit keys to git or expose them in client-side code.
Keys are only shown once at creation - save them securely.
Your API Keys
Loading API keys
How to Use API Keys
Keep this server-side only. Put the key in your backend environment and send it as a Bearer token.
fetch('https://sorted-backend.onrender.com/sponsor/authorize', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY_HERE'
},
body: JSON.stringify({
projectId: 'test-game',
user: '0x...',
target: '0x...',
selector: '0x...',
estimatedGas: 500000,
clientNonce: '0x...',
chainId: 14601
})
})
Best-practice checklist
- Store keys in environment variables
- Never commit keys to source control
- Use separate keys per environment
- Rotate keys regularly and revoke on compromise