$post_data = array (
"Username" => "dacruz1599@yahoo.com",
"Password" => "Dominicc1599",
"ClientToken" => "7c825a05-817a-4aad-939e-02c9dd3d923a"
);
$ch = curl_init("https://authserver.ely.by/auth/authenticate");
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 4);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$output = curl_exec($ch);
application/x-www-form-urlencoded
works too);$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://authserver.ely.by/auth/authenticate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\n\t\"username\":\"dacruz1599@yahoo.com\",\n\t\"password\":\"Dominicc1599\",\n\t\"clientToken\":\"7c825a05-817a-4aad-939e-02c9dd3d923a\"\n}",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
{
"error": "ForbiddenOperationException",
"errorMessage": "Invalid credentials. Invalid email or password."
}
Find more questions by tags API
- hilma.Mull commented on March 31st 20 at 15:46