Hi I am using Parse and I try to logged in with PHP Code but everytime it writes me {"code":200,"error":"missing username"}
Here is the PHP Code:
$headers = array(
"Content-Type: application/json",
"X-Parse-Application-Id: " . $appId,
"X-Parse-REST-API-Key: " . $restKey
);
$username = urlencode('[email protected]');
$password = urlencode('password=test');
$url = "https://api.parse.com/1/login/$username&$password";
$rest = curl_init();
curl_setopt($rest,CURLOPT_URL,$url);
curl_setopt($rest,CURLOPT_HTTPGET,1);
curl_setopt($rest,CURLOPT_CUSTOMREQUEST,"GET");
curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
curl_setopt($rest,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($rest);
echo $response;
curl_close($rest);
What I am missing ?
?has to be before$username.$username, not in the variable.