1. Home
  2. Knowledge Base
  3. API
  4. Checking For a Successful Request

Checking For a Successful Request

An API request can either by successful or not. The best way to explain how to check for this is through code so let's go through it.

$response = $api->get('/levels');
$response = unserialize($response);
echo 'Request successful';
// do stuff here
} else {
echo 'Request failed';
echo '<br />';
echo 'Error Code:' . $response['ERROR_CODE'];
echo '<br />';
echo 'Error Description:' . $response['ERROR'];
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support