1. Home
  2. API
  3. 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

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket