Ответов: 1 Просмотров: 2561
|
Здравствуйте. Я только осваиваю cURL.
Помогите, пожалуйста, составить запрос к API Яндекс.Деньги
Мне нужно получить токен авторизации
PHP:
скопировать код в буфер обмена
$header = array('POST /oauth/authorize HTTP/1.1', 'Host: sp-money.yandex.ru', 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8', 'Content-Length: 12345'); curl_setopt($ch, CURLOPT_URL , "https://oauth.yandex.ru/token"); curl_setopt($ch,CURLOPT_POSTFIELDS ,'client_id=IDМОЕГОПРИЛОЖЕНИЯ&response_type=code &redirect_uri=http://хххх/redirect.php&scope=account%2Dinfo%20operation%2Dhistory');
Этот код не работает, но не знаю как исправить( |