params ACTION REGISTER_NEW_ACCOUNT account user_name dqwwadoo 10mail o

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$params = [
'ACTION' => 'REGISTER_NEW_ACCOUNT',
'account' => [
'user_name' => 'dqwwadoo@10mail.orgw',
'password' => 'nisakovamocrm',
'first_name' => 'Никита Исаков',
'phone_num' => '7 123 456 78 90',
]
];
$url = 'http://wwwru.main.amocrm2.saas/account/api_account_registration.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch ,CURLOPT_POSTFIELDS, $params);
$answer = curl_exec($ch);