Error Codes
We've tried our best to make Snaggr as stable and reliable as possible. In doing so we've created a comprehensive list of error codes and messages. Below you will find a sectioned list of error codes and corresponding messages as well as the different formats to expect them in.
Error Codes
Formats
500 - Invalid Format Specified
Accounts
600 - HTTP Authentication Failed
601 - Key/Member Association Failed
602 - Account Authentication Failed
Keys
700 - Invalid API Key Provided
701 - API Account Inactive
702 - API Account Banned
703 - API Request Limit Reached
Services
800 - Invalid Service Format
801 - Invalid Service Method Specified
802 - Allotted Service Request Limit Reached
803 - Requested Service Unavailable
804 - Requested Service Requires Authentication
805 - Requested Service Path Not Found
806 - Invalid Key Association
System
900 - Access Forbidden
901 - Invalid Request
902 - Maintenance Mode
Formats
XML
<rsp stat="fail">
<header>
<method>METHOD_NAME</method>
<key>API_KEY</key>
</header>
<error code="CODE" message="MESSAGE"/>
</rsp>
JSON
({"results":{"header":{"status":"fail","method":"METHOD_NAME","key":"API_KEY"},"error":{"code":CODE,"message":"MESSAGE"}}})
PHP
a:1:{s:7:"results";a:2:{s:6:"header";a:3:{s:6:"status";s:4:"fail";s:6:"method";s:11:"METHOD_NAME";s:3:"key";s:7:"API_KEY";}s:5:"error";a:2:{s:4:"code";i:CODE;s:7:"message";s:7:"MESSAGE";}}}