Community discussions

MikroTik App
 
davidromba
just joined
Topic Author
Posts: 4
Joined: Wed May 05, 2021 6:11 pm

Cpanel DNS update

Wed Sep 08, 2021 11:45 am

Hi, i am trying to create a script that automaticaly updates a dns record on the server using https api but i am having problems can anyone help?
i am trying to use
Cpanel documentation:
https://api.docs.cpanel.net/cpanel/introduction
this is how far ihave got
tool fetch mode=https url="https://wifialgarve.com/json-api/setsiteip?
domain=yourclient.wifialgarve.com&ip=newip" port=2087 http-method=post http-header-field=
"Authorization:  cpanel  username:APITOKEN" 
but gives-me this error
failure: closing connection: <403 Forbidden Access denied> 130.185.84.202:2087 (4)
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Cpanel DNS update

Wed Sep 08, 2021 1:12 pm

Do not expect than I study how the API works, this is just a example to fix what you have wroted, but I can nnot check if you have wroted the right commands.
/tool fetch url="https://wifialgarve.com:2087/json-api/setsiteip?domain=yourclient.wifialgarve.com&ip=newip" \
    http-method=post http-header-field="Authorization: cpanel,username: APITOKEN"

Who is online

Users browsing this forum: adimihaix, rplant and 77 guests