Answer the question
In order to leave comments, you need to log in
Why can't I change the Yandex PDD DNS record via the API (NODEJS REQUEST)?
I'm trying to change the A record but it returns the html redirect to the documentation.
request.post({
headers: {'content-type':'text/json', 'PddToken':'мой_админский_токен'},
url: 'https://pddimp.yandex.ru/api2/admin/dns/edit',
body: 'domain=мой_домен&record_id=ид_записи&content=нужный_ip'
}, function(error, response, body){
console.log(body);
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="https://tech.yandex.ru/pdd/doc/about-docpage/">https://tech.yandex.ru/pdd/doc/about-docpage/</a>. If not click the link.
Answer the question
In order to leave comments, you need to log in
A similar question on a toaster
helped .
That's how it works.
request.post({
headers: {'content-type':'text/json', 'PddToken':'мой_админский_токен'},
url: 'https://pddimp.yandex.ru/api2/admin/dns/edit?domain=мой_домен&record_id=ид_записи&content=нужный_ip'
}, function(error, response, body){
console.log(body);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question