The Metaculus API uses token-based authentication for all API requests. You must include a valid API token in the Authorization header of every request.
All API requests require valid authentication credentials. Unauthenticated requests will be rejected with a 401 Unauthorized error.
Click to generate a new token or view your existing token
Keep your API token secret! Anyone with your token can make API requests on your behalf. Never commit tokens to version control or share them publicly.
{ "detail": "You do not have permission to perform this action."}
Solution: You’re authenticated but don’t have permission to access this resource. Check if the resource requires special permissions or if you’re accessing a private tournament.
For production applications, consider rotating your API tokens periodically:
Generate a new token from your account settings
Update your application to use the new token
Revoke the old token once migration is complete
You can also rotate your API token programmatically using the API:
curl -X POST "https://www.metaculus.com/api/auth/api-key/rotate/" \ -H "Authorization: Token YOUR_CURRENT_TOKEN"
After rotating your token, your old token will be immediately invalidated. Make sure to update your application with the new token before the rotation completes.