Can't send the request to the server The Next CEO of Stack OverflowCan't send POST request to the remote serverHow to send a header using a HTTP request through a curl call?How can I see the request headers made by curl when sending a request to the server?How to display request headers with command line curlphp curl returns 400 Bad Request if does in a loopDesign for Facebook authentication in an iOS app that also accesses a secured web serviceHow do I send a POST request with PHP?Why do browsers not send the Authentication header when the credentials are provided in the URL?Post/Get Request not sending parametersLaravel 5 / Nginx - strange behavior of CORS headers set at web server levelPHP cURL working in localhost but not working on Linux Server

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

INSERT to a table from a database to other (same SQL Server) using Dynamic SQL

Is there always a complete, orthogonal set of unitary matrices?

Proper way to express "He disappeared them"

Rotate a column

What happened in Rome, when the western empire "fell"?

What does "Its cash flow is deeply negative" mean?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Can we say or write : "No, it'sn't"?

How many extra stops do monopods offer for tele photographs?

How a 64-bit process virtual address space is divided in Linux?

Method for adding error messages to a dictionary given a key

Why the difference in type-inference over the as-pattern in two similar function definitions?

Won the lottery - how do I keep the money?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

Find non-case sensitive string in a mixed list of elements?

Powershell. How to parse gci Name?

I want to delete every two lines after 3rd lines in file contain very large number of lines :

Why this way of making earth uninhabitable in Interstellar?

Why is my new battery behaving weirdly?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Should I cite using beginthebibliography or beginfilecontents*

Is it possible to replace duplicates of a character with one character using tr

Does soap repel water?



Can't send the request to the server



The Next CEO of Stack OverflowCan't send POST request to the remote serverHow to send a header using a HTTP request through a curl call?How can I see the request headers made by curl when sending a request to the server?How to display request headers with command line curlphp curl returns 400 Bad Request if does in a loopDesign for Facebook authentication in an iOS app that also accesses a secured web serviceHow do I send a POST request with PHP?Why do browsers not send the Authentication header when the credentials are provided in the URL?Post/Get Request not sending parametersLaravel 5 / Nginx - strange behavior of CORS headers set at web server levelPHP cURL working in localhost but not working on Linux Server










0















I've some problem with the PHP script. So, I'm trying to connect to the FMI Server, but when I'm enter a valid credentials the server always return HTTP code 330, instead of 200 OK. Also when I'm trying with invalid credentials it's return 401 and it's okay, but why I've this problem only with VALID credentials?
What I'm tried?



curl_setopt($ch,CURLOPT_ENCODING , "gzip");


But no luck :(



Here's my code:



<?php
$username = "callibra@yandex.ru"; //Valid login
$password = "callibra4App"; //Valid Password
class FMIWebApplication
private $client = array(
"user-agent" => "FindMyiPhone/472.1 CFNetwork/711.1.12 Darwin/14.0.0",
"headers" => array(
"X-Apple-Realm-Support" => "1.0",
"X-Apple-Find-API-Ver" => "3.0",
"X-Apple-AuthScheme" => "UserIdGuest",
"X-Apple-I-MD-RINFO" => "17106176",
"Accept" => "*/*",
"Connection" => "keep-alive",
"Accept-Encoding" => "br, gzip, deflate",
"Accept-Language" => "en-us",
"X-Apple-I-TimeZone" => "GMT+2",
"X-Apple-I-Locale" => "en_US"
)
);
public $username;
public $password;
public $devices = array();

public function __construct($username, $password)
$this->username = $username;
$this->password = $password;
$this->authenticate();


public function authenticate()
$url = "https://fmipmobile.icloud.com/fmipservice/device/".$this->username."/initClient";
list($headers, $body) = $this->curlPOST($url, "", $this->username.":".$this->password);
/*
if ($headers["http_code"] == 200)
return 200;
;
if ($headers["http_code"] == 401)
return 401;
;
if ($headers["http_code"] == 403)
return 403;
;*/
echo $headers["http_code"];



private function curlPOST($url, $body, $authentication = "")
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->client["user-agent"]);
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
if (strlen($authentication) > 0)
curl_setopt($ch, CURLOPT_USERPWD, $authentication);

$arrHeaders = array();
$arrHeaders["Content-Length"] = strlen($request);
foreach ($this->client["headers"] as $key=>$value)
array_push($arrHeaders, $key.": ".$value);

curl_setopt($ch, CURLOPT_HTTPHEADER, $arrHeaders);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$responseBody = substr($response, $header_size);
$headers = array();
foreach (explode("rn", substr($response, 0, $header_size)) as $i => $line)
if ($i === 0)
$headers['http_code'] = $info["http_code"];
else
list ($key, $value) = explode(': ', $line);
if (strlen($key) > 0)
$headers[$key] = $value;


return array($headers, json_decode($responseBody, true));


$API = new FMIWebApplication($username, $password);
$API->authenticate();
?>


That's what I'm getting from the server:



HTTP/1.1 330 Server: AppleHttpServer/70a91026 Date: Thu, 07 Mar 2019 13:23:40 GMT Content-Length: 0 Connection: keep-alive X-Responding-Instance: fmipservice:34000504:mr23p40ic-ztdg08174101:7004:1903B41:738abffa X-Responding-Server: mr23p40ic-ztdg08174101_004 X-Responding-Partition: p40 X-Apple-MMe-Host: p40-fmipmobile.icloud.com X-Apple-MMe-Scope: 639524741 Strict-Transport-Security: max-age=31536000; includeSubDomains Set-Cookie: NSC_q40-gnjqtfswjdf=6ad0a3dee1e78d9bd168cb5a7ceafc289128c7a38269b4bddde70dac09e4e273e5f12331;path=/;secure;httponly via: icloudedge:mc10p01ic-zteu01141501:7401:18RC846:Manchester X-Apple-Request-UUID: 8d5dc207-f1f8-453f-8863-9e0d5ab3b58b access-control-expose-headers: X-Apple-Request-UUID access-control-expose-headers: Via 330









share|improve this question
























  • what's your curl output?

    – Kris Roofe
    Mar 7 at 13:06











  • 330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

    – ADyson
    Mar 7 at 13:07











  • And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

    – ADyson
    Mar 7 at 13:07












  • ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

    – Adrian Shephard
    Mar 7 at 13:15











  • I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

    – ADyson
    Mar 7 at 13:32















0















I've some problem with the PHP script. So, I'm trying to connect to the FMI Server, but when I'm enter a valid credentials the server always return HTTP code 330, instead of 200 OK. Also when I'm trying with invalid credentials it's return 401 and it's okay, but why I've this problem only with VALID credentials?
What I'm tried?



curl_setopt($ch,CURLOPT_ENCODING , "gzip");


But no luck :(



Here's my code:



<?php
$username = "callibra@yandex.ru"; //Valid login
$password = "callibra4App"; //Valid Password
class FMIWebApplication
private $client = array(
"user-agent" => "FindMyiPhone/472.1 CFNetwork/711.1.12 Darwin/14.0.0",
"headers" => array(
"X-Apple-Realm-Support" => "1.0",
"X-Apple-Find-API-Ver" => "3.0",
"X-Apple-AuthScheme" => "UserIdGuest",
"X-Apple-I-MD-RINFO" => "17106176",
"Accept" => "*/*",
"Connection" => "keep-alive",
"Accept-Encoding" => "br, gzip, deflate",
"Accept-Language" => "en-us",
"X-Apple-I-TimeZone" => "GMT+2",
"X-Apple-I-Locale" => "en_US"
)
);
public $username;
public $password;
public $devices = array();

public function __construct($username, $password)
$this->username = $username;
$this->password = $password;
$this->authenticate();


public function authenticate()
$url = "https://fmipmobile.icloud.com/fmipservice/device/".$this->username."/initClient";
list($headers, $body) = $this->curlPOST($url, "", $this->username.":".$this->password);
/*
if ($headers["http_code"] == 200)
return 200;
;
if ($headers["http_code"] == 401)
return 401;
;
if ($headers["http_code"] == 403)
return 403;
;*/
echo $headers["http_code"];



private function curlPOST($url, $body, $authentication = "")
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->client["user-agent"]);
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
if (strlen($authentication) > 0)
curl_setopt($ch, CURLOPT_USERPWD, $authentication);

$arrHeaders = array();
$arrHeaders["Content-Length"] = strlen($request);
foreach ($this->client["headers"] as $key=>$value)
array_push($arrHeaders, $key.": ".$value);

curl_setopt($ch, CURLOPT_HTTPHEADER, $arrHeaders);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$responseBody = substr($response, $header_size);
$headers = array();
foreach (explode("rn", substr($response, 0, $header_size)) as $i => $line)
if ($i === 0)
$headers['http_code'] = $info["http_code"];
else
list ($key, $value) = explode(': ', $line);
if (strlen($key) > 0)
$headers[$key] = $value;


return array($headers, json_decode($responseBody, true));


$API = new FMIWebApplication($username, $password);
$API->authenticate();
?>


That's what I'm getting from the server:



HTTP/1.1 330 Server: AppleHttpServer/70a91026 Date: Thu, 07 Mar 2019 13:23:40 GMT Content-Length: 0 Connection: keep-alive X-Responding-Instance: fmipservice:34000504:mr23p40ic-ztdg08174101:7004:1903B41:738abffa X-Responding-Server: mr23p40ic-ztdg08174101_004 X-Responding-Partition: p40 X-Apple-MMe-Host: p40-fmipmobile.icloud.com X-Apple-MMe-Scope: 639524741 Strict-Transport-Security: max-age=31536000; includeSubDomains Set-Cookie: NSC_q40-gnjqtfswjdf=6ad0a3dee1e78d9bd168cb5a7ceafc289128c7a38269b4bddde70dac09e4e273e5f12331;path=/;secure;httponly via: icloudedge:mc10p01ic-zteu01141501:7401:18RC846:Manchester X-Apple-Request-UUID: 8d5dc207-f1f8-453f-8863-9e0d5ab3b58b access-control-expose-headers: X-Apple-Request-UUID access-control-expose-headers: Via 330









share|improve this question
























  • what's your curl output?

    – Kris Roofe
    Mar 7 at 13:06











  • 330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

    – ADyson
    Mar 7 at 13:07











  • And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

    – ADyson
    Mar 7 at 13:07












  • ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

    – Adrian Shephard
    Mar 7 at 13:15











  • I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

    – ADyson
    Mar 7 at 13:32













0












0








0








I've some problem with the PHP script. So, I'm trying to connect to the FMI Server, but when I'm enter a valid credentials the server always return HTTP code 330, instead of 200 OK. Also when I'm trying with invalid credentials it's return 401 and it's okay, but why I've this problem only with VALID credentials?
What I'm tried?



curl_setopt($ch,CURLOPT_ENCODING , "gzip");


But no luck :(



Here's my code:



<?php
$username = "callibra@yandex.ru"; //Valid login
$password = "callibra4App"; //Valid Password
class FMIWebApplication
private $client = array(
"user-agent" => "FindMyiPhone/472.1 CFNetwork/711.1.12 Darwin/14.0.0",
"headers" => array(
"X-Apple-Realm-Support" => "1.0",
"X-Apple-Find-API-Ver" => "3.0",
"X-Apple-AuthScheme" => "UserIdGuest",
"X-Apple-I-MD-RINFO" => "17106176",
"Accept" => "*/*",
"Connection" => "keep-alive",
"Accept-Encoding" => "br, gzip, deflate",
"Accept-Language" => "en-us",
"X-Apple-I-TimeZone" => "GMT+2",
"X-Apple-I-Locale" => "en_US"
)
);
public $username;
public $password;
public $devices = array();

public function __construct($username, $password)
$this->username = $username;
$this->password = $password;
$this->authenticate();


public function authenticate()
$url = "https://fmipmobile.icloud.com/fmipservice/device/".$this->username."/initClient";
list($headers, $body) = $this->curlPOST($url, "", $this->username.":".$this->password);
/*
if ($headers["http_code"] == 200)
return 200;
;
if ($headers["http_code"] == 401)
return 401;
;
if ($headers["http_code"] == 403)
return 403;
;*/
echo $headers["http_code"];



private function curlPOST($url, $body, $authentication = "")
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->client["user-agent"]);
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
if (strlen($authentication) > 0)
curl_setopt($ch, CURLOPT_USERPWD, $authentication);

$arrHeaders = array();
$arrHeaders["Content-Length"] = strlen($request);
foreach ($this->client["headers"] as $key=>$value)
array_push($arrHeaders, $key.": ".$value);

curl_setopt($ch, CURLOPT_HTTPHEADER, $arrHeaders);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$responseBody = substr($response, $header_size);
$headers = array();
foreach (explode("rn", substr($response, 0, $header_size)) as $i => $line)
if ($i === 0)
$headers['http_code'] = $info["http_code"];
else
list ($key, $value) = explode(': ', $line);
if (strlen($key) > 0)
$headers[$key] = $value;


return array($headers, json_decode($responseBody, true));


$API = new FMIWebApplication($username, $password);
$API->authenticate();
?>


That's what I'm getting from the server:



HTTP/1.1 330 Server: AppleHttpServer/70a91026 Date: Thu, 07 Mar 2019 13:23:40 GMT Content-Length: 0 Connection: keep-alive X-Responding-Instance: fmipservice:34000504:mr23p40ic-ztdg08174101:7004:1903B41:738abffa X-Responding-Server: mr23p40ic-ztdg08174101_004 X-Responding-Partition: p40 X-Apple-MMe-Host: p40-fmipmobile.icloud.com X-Apple-MMe-Scope: 639524741 Strict-Transport-Security: max-age=31536000; includeSubDomains Set-Cookie: NSC_q40-gnjqtfswjdf=6ad0a3dee1e78d9bd168cb5a7ceafc289128c7a38269b4bddde70dac09e4e273e5f12331;path=/;secure;httponly via: icloudedge:mc10p01ic-zteu01141501:7401:18RC846:Manchester X-Apple-Request-UUID: 8d5dc207-f1f8-453f-8863-9e0d5ab3b58b access-control-expose-headers: X-Apple-Request-UUID access-control-expose-headers: Via 330









share|improve this question
















I've some problem with the PHP script. So, I'm trying to connect to the FMI Server, but when I'm enter a valid credentials the server always return HTTP code 330, instead of 200 OK. Also when I'm trying with invalid credentials it's return 401 and it's okay, but why I've this problem only with VALID credentials?
What I'm tried?



curl_setopt($ch,CURLOPT_ENCODING , "gzip");


But no luck :(



Here's my code:



<?php
$username = "callibra@yandex.ru"; //Valid login
$password = "callibra4App"; //Valid Password
class FMIWebApplication
private $client = array(
"user-agent" => "FindMyiPhone/472.1 CFNetwork/711.1.12 Darwin/14.0.0",
"headers" => array(
"X-Apple-Realm-Support" => "1.0",
"X-Apple-Find-API-Ver" => "3.0",
"X-Apple-AuthScheme" => "UserIdGuest",
"X-Apple-I-MD-RINFO" => "17106176",
"Accept" => "*/*",
"Connection" => "keep-alive",
"Accept-Encoding" => "br, gzip, deflate",
"Accept-Language" => "en-us",
"X-Apple-I-TimeZone" => "GMT+2",
"X-Apple-I-Locale" => "en_US"
)
);
public $username;
public $password;
public $devices = array();

public function __construct($username, $password)
$this->username = $username;
$this->password = $password;
$this->authenticate();


public function authenticate()
$url = "https://fmipmobile.icloud.com/fmipservice/device/".$this->username."/initClient";
list($headers, $body) = $this->curlPOST($url, "", $this->username.":".$this->password);
/*
if ($headers["http_code"] == 200)
return 200;
;
if ($headers["http_code"] == 401)
return 401;
;
if ($headers["http_code"] == 403)
return 403;
;*/
echo $headers["http_code"];



private function curlPOST($url, $body, $authentication = "")
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->client["user-agent"]);
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
if (strlen($authentication) > 0)
curl_setopt($ch, CURLOPT_USERPWD, $authentication);

$arrHeaders = array();
$arrHeaders["Content-Length"] = strlen($request);
foreach ($this->client["headers"] as $key=>$value)
array_push($arrHeaders, $key.": ".$value);

curl_setopt($ch, CURLOPT_HTTPHEADER, $arrHeaders);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$responseBody = substr($response, $header_size);
$headers = array();
foreach (explode("rn", substr($response, 0, $header_size)) as $i => $line)
if ($i === 0)
$headers['http_code'] = $info["http_code"];
else
list ($key, $value) = explode(': ', $line);
if (strlen($key) > 0)
$headers[$key] = $value;


return array($headers, json_decode($responseBody, true));


$API = new FMIWebApplication($username, $password);
$API->authenticate();
?>


That's what I'm getting from the server:



HTTP/1.1 330 Server: AppleHttpServer/70a91026 Date: Thu, 07 Mar 2019 13:23:40 GMT Content-Length: 0 Connection: keep-alive X-Responding-Instance: fmipservice:34000504:mr23p40ic-ztdg08174101:7004:1903B41:738abffa X-Responding-Server: mr23p40ic-ztdg08174101_004 X-Responding-Partition: p40 X-Apple-MMe-Host: p40-fmipmobile.icloud.com X-Apple-MMe-Scope: 639524741 Strict-Transport-Security: max-age=31536000; includeSubDomains Set-Cookie: NSC_q40-gnjqtfswjdf=6ad0a3dee1e78d9bd168cb5a7ceafc289128c7a38269b4bddde70dac09e4e273e5f12331;path=/;secure;httponly via: icloudedge:mc10p01ic-zteu01141501:7401:18RC846:Manchester X-Apple-Request-UUID: 8d5dc207-f1f8-453f-8863-9e0d5ab3b58b access-control-expose-headers: X-Apple-Request-UUID access-control-expose-headers: Via 330






php ios ssl curl php-7






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 13:25







Adrian Shephard

















asked Mar 7 at 13:02









Adrian ShephardAdrian Shephard

13




13












  • what's your curl output?

    – Kris Roofe
    Mar 7 at 13:06











  • 330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

    – ADyson
    Mar 7 at 13:07











  • And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

    – ADyson
    Mar 7 at 13:07












  • ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

    – Adrian Shephard
    Mar 7 at 13:15











  • I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

    – ADyson
    Mar 7 at 13:32

















  • what's your curl output?

    – Kris Roofe
    Mar 7 at 13:06











  • 330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

    – ADyson
    Mar 7 at 13:07











  • And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

    – ADyson
    Mar 7 at 13:07












  • ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

    – Adrian Shephard
    Mar 7 at 13:15











  • I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

    – ADyson
    Mar 7 at 13:32
















what's your curl output?

– Kris Roofe
Mar 7 at 13:06





what's your curl output?

– Kris Roofe
Mar 7 at 13:06













330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

– ADyson
Mar 7 at 13:07





330 is a very unusual status code. Have you asked icloud support (or FMI if they're a separate entity) what it might mean when their server returns this? (P.S. I'd guess you get 401 with invalid credentials - which is the correct response - rather than 330 because the credential test occurs before whatever code is resulting in the 330, and therefore that code never runs as it errors out of the authentication)

– ADyson
Mar 7 at 13:07













And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

– ADyson
Mar 7 at 13:07






And when you get this status code, does it still return the expected content in the response, or not? You didn't mention that. It would be useful if it returned some sort of explanation along with the code.

– ADyson
Mar 7 at 13:07














ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

– Adrian Shephard
Mar 7 at 13:15





ADyson, nope, it's not returning anything, just a http code 330. That's all what getting...

– Adrian Shephard
Mar 7 at 13:15













I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

– ADyson
Mar 7 at 13:32





I don't see where in the code you actually try to echo the body though? Also if json_decode failed for any reason it would still show null even then. Perhaps you should add an echo of the raw response from curl

– ADyson
Mar 7 at 13:32












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55044450%2fcant-send-the-request-to-the-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55044450%2fcant-send-the-request-to-the-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

Алба-Юлія

Захаров Федір Захарович