Hello, I would send POST data to the Sign In with Apple REST API, but corrently I got the error 403 Forbidden on my server. If i test it with curl in the terminal, it works.
Here is the php code for this:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://appleid.apple.com/auth/token');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($myArray));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$serverOutput = curl_exec($ch);
if(curl_exec($ch) === false)
{
echo 'Curl error: ' . curl_error($ch);
}
curl_close ($ch);
print_r($serverOutput);
I got http code 403 by apple server. What is wrong?