From 71190fd8d24111b2840d50fe589d47069a0e982f Mon Sep 17 00:00:00 2001 From: Joel Margolis Date: Mon, 31 Aug 2015 22:59:15 -0400 Subject: [PATCH] client token request uses SSL now --- src/snapchat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snapchat.php b/src/snapchat.php index 6e6aae6..25c6f2d 100644 --- a/src/snapchat.php +++ b/src/snapchat.php @@ -285,7 +285,7 @@ public function getClientAuthToken($username, $password, $timestamp) ); $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "http://client-auth.casper.io/"); + curl_setopt($ch, CURLOPT_URL, "https://api.casper.io/security/login/signrequest/"); curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); @@ -303,7 +303,7 @@ public function getClientAuthToken($username, $password, $timestamp) } curl_close($ch); $return = json_decode($return, true); - if(!$return || $return["status"] != 200 || !isset($return["signature"])) + if(!$return || $return["code"] != 200 || !isset($return["signature"])) { $return["error"] = 1; $return["data"] = "Invalid JSON / Incorrect status / No signature returned.";