I am trying to connect to the LEADS.SU API and send a questionnaire.

<?php $ch = curl_init("http://api.leads.su/webmaster/leads/push?"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, array( "token" => "58803b7d540dd0304d3b6c9101665222", "platform_id" => "1082221", "offer_id" => "485", "birthdate" => "1978-12-01", "birthplace" => "Воронеж", "credit_days" => "20", "credit_sum" => "5000", "fact_city_name" => "Воронежская область", "fact_region_name" => "Воронеж", "firstname " => "Сергей", "gender" => "male", "lastname" => "Иванов", "middlename" => "Анатольевич", "mphone" => "79507747250", "overdue_loans" => "credit_closed_no_delay", "passport_code" => "2010555698", "passport_date" => "1999-06-01", "passport_title" => "123-001 Пролетарским РОВД", "reg_city_name" => "Воронежская область", "reg_region_name" => "Воронеж", "is_test" => "1" )); $body = curl_exec($ch); curl_close($ch); 

?>

But nothing works. No errors, but in the conversion history of the questionnaire either. What am I doing wrong? Thank!

    1 answer 1

     curl_setopt($curl, CURLOPT_POST, true); 

    try to fix on

     curl_setopt($ch, CURLOPT_POST, true); 
    • Alas, did not work ( - Anton Bogomolov
    • I get an error "Access token is missing". Are you using the API correctly? - TarasovSA
    • token 58803b7d540dd0304d3b6c9101665c23 and "platform_id" => "1088801" - Anton Bogomolov
    • But is there an opportunity to see how their API works? - TarasovSA
    • webmaster.leads.su/tools/api , but reg is required - Anton Bogomolov