Shared Responses
These may show up on any given route in any service.
The contents of error & message are unreliable, use code instead. See Error Codes for a full list.
401 Unauthorized: Invalid API Key
{ "success": false, "code": 1010, "error": "Invalid API key." }
401 Unauthorized: API Key Inactive
{ "success": false, "code": 1011, "error": "API key is inactive." }
401 Unauthorized: API Key Required
{ "success": false, "code": 1013, "error": "An API key is required to access this service." }
403 Forbidden: API Key Disabled
{ "success": false, "code": 1012, "error": "Your API key has been disabled by an administrator. See \"extra.reason\" for the reasoning.", "extra": { "reason": "", "support": "https://yiff.rest/support" } }
403 Forbidden: No Access To Service
{ "success": false, "code": 1022, "error": "You do not have access to this service." }
403 Forbidden: IP Blocked
{ "success": false, "code": 1002, "error": "You have been blocked from accessing this service.", "extra": { "reason": "", "support": "https://yiff.rest/support" } }
429 Too Many Requests: Rate Limited
// global headers will also be present { "success": false, "error": "Request Limit Exceeded", "code": 1000, "info": { "limit": 0, // X-RateLimit-Limit "remaining": 0, // X-RateLimit-Remaining "reset": 0, // X-RateLimit-Reset "resetAfter": 0, // X-RateLimit-Reset-After "retryAfter": 0, // Retry-After "bucket": "", // X-RateLimit-Bucket "precision": "millisecond", // X-RateLimit-Precision "global": false } }
429 Too Many Requests: Globally Rate Limited
// route specific headers will also be present { "success": false, "error": "Request Limit Exceeded", "code": 1001, "info": { "limit": 0, // X-RateLimit-Global-Limit "remaining": 0, // X-RateLimit-Global-Remaining "reset": 0, // X-RateLimit-Global-Reset "resetAfter": 0, // X-RateLimit-Global-Reset-After "retryAfter": 0, // Retry-After "precision": "millisecond", // X-RateLimit-Global-Precision "global": true } }
503 Service Unavailable: Read Only
{ "success": false, "code": 2, "error": "This service is currently in read only mode. Try again later." }
