diff --git a/src/snapchat_agent.php b/src/snapchat_agent.php index 12bd02a..004d40b 100644 --- a/src/snapchat_agent.php +++ b/src/snapchat_agent.php @@ -432,6 +432,12 @@ public function post($endpoint, $data, $params, $multipart = FALSE, $debug = FAL if($endpoint == "/loq/login" || $endpoint == "/all_updates") { + if (strpos($result,'401 UNAUTHORIZED') !== false) + { + echo "\nRESULT: 401 UNAUTHORIZED\n"; + exit(); + } + $jsonResult = json_decode($result); echo 'RESULT: ' . print_r($jsonResult) . "\n"; if (property_exists($jsonResult, "status") && $jsonResult->status == '-103')