Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Commit 71190fd

Browse files
committed
client token request uses SSL now
1 parent fc02c6b commit 71190fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/snapchat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function getClientAuthToken($username, $password, $timestamp)
285285
);
286286

287287
$ch = curl_init();
288-
curl_setopt($ch, CURLOPT_URL, "http://client-auth.casper.io/");
288+
curl_setopt($ch, CURLOPT_URL, "https://api.casper.io/security/login/signrequest/");
289289
curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
290290
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
291291
curl_setopt($ch, CURLOPT_HEADER, FALSE);
@@ -303,7 +303,7 @@ public function getClientAuthToken($username, $password, $timestamp)
303303
}
304304
curl_close($ch);
305305
$return = json_decode($return, true);
306-
if(!$return || $return["status"] != 200 || !isset($return["signature"]))
306+
if(!$return || $return["code"] != 200 || !isset($return["signature"]))
307307
{
308308
$return["error"] = 1;
309309
$return["data"] = "Invalid JSON / Incorrect status / No signature returned.";

0 commit comments

Comments
 (0)