The PredictHQ API uses conventional HTTP status codes to indicate the success or failure of an API request. If you receive an error, this is what it means:
|The request contains invalid parameters, or invalid or incomplete data.|
|You failed to provide an Authorization header, or your credentials are invalid or expired.|
|Your subscription has expired.|
|You tried to perform an action that is not authorized. E.g. you failed to request the required scope.|
|The resource or endpoint does not exist.|
|Too Many Requests
|You reached your global or subscription rate limit.|
|The API has been switched to maintenance mode for a major or complex release.|
If you get a
404 Not Found, please check that your URL ends with a trailing slash (
As with any API exposed over the public Internet, some requests may fail and they should simply be retried automatically. We recommend that you implement a solution that automatically retries any
5xx errors 3 times with an exponentially increasing delay.
For example: On receiving a
5xx response immediately retry, if you receive a subsequent
5xx response wait 1 second and retry, if you receive a further
5xx response wait 5 seconds and retry, if you still receive a 5xx response fail the request and handle it accordingly.
When your computer says no, it's helpful to know how to make it say yes. Below is a summary of error codes and corresponding HTTP status codes for the OAuth 2.0 flow.
|The request is malformed, a parameter has an invalid value or is missing.|
|Client authentication failed.|
|Client is not authorized to use the grant.|
|Authorization grant is not supported by the Authorization Server.|
|The scope is malformed or invalid.|