Пытаюсь получить токен для юмани, попробовал через ноду, выводит ошибку Uncaught SyntaxError: missing ) after argument list (at auth.html:17:71)
<script>
const needle = require("needle") // Подключаем Needle для запросов.
const clientId = "" // Создаем константу с нашим client_id.
const scopes = [
"account-info"
]
const postDataAuthorize = {
client_id: clientId,
response_type: "code",
redirect_uri: "ури",
scope: scopes
}
needle.post('https://yoomoney.ru/oauth/authorize', postDataAuthorize, headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, (err, resp) => {
console.log(resp.body) // выводим ответ.
})
</script>
Uncaught SyntaxError: missing ) after argument list (at auth.html:17:71)
Ошибка, собственно в это строке :
needle.post('https://yoomoney.ru/oauth/authorize', postDataAuthorize, headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, (err, resp) => {
console.log(resp.body) // выводим ответ.
})