Authentication
All API requests require authentication using Bearer tokens.
Authorization Header
Include your API token in the Authorization header:
| Header | Value | Description |
|---|---|---|
Authorization | Bearer TOKEN | Your API token |
Example
curl "https://api.pinner.xyz/api/upload-limit" \
-H "Authorization: Bearer YOUR_API_TOKEN"Getting Your API Token
- Sign up at account.pinner.info
- Navigate to your account settings
- Generate a new API token
Environment Variables
Set the PINNER_API_KEY environment variable:
export PINNER_API_KEY="your-api-token"Or use PINNER_AUTH_TOKEN for CLI operations:
export PINNER_AUTH_TOKEN="your-api-token"Token Security
- Keep your token secure and never expose it in client-side code
- Use environment variables to store tokens
- Rotate tokens if they are compromised
Error Responses
401 Unauthorized:{
"error": "unauthorized",
"message": "Invalid or missing API token"
}{
"error": "forbidden",
"message": "Insufficient permissions"
}