Answer the question
In order to leave comments, you need to log in
Who will tell you how to use the API?
Documentation https://github.com/MinerGate/minergate-api#login
I need to authorize in PHP
All I thought of it
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://api.minergate.com/1.0/auth/login');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, "email=$email&password=$pass&totp=123456");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'
));
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
{"code":"InvalidContent","message":"Invalid JSON: Unexpected token e in JSON at position 0"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question