IP Address Update IP Address Update

Topic: IP Address Update

Post IP Address Update
by devankistan on mercredi 8 juin 2022

Hello,

I am trying to use your v2 API and want to update the IP address from my server.
On the page: https://www.dynu.com/Support/API#/
I am using POST: /dns/{id} Update an existing DNS service.

I am looking to have the ip address set to my public ip address. However when I leave or set to null the ipv4Address property in the json payload, the ip in the control panel is not update. How can I get your API to use the client ip address automatically using a v2 request?

Note: It does work if I specify an IPAddress when I make my call when I am testing. However in production, I won't know what the public ipaddress is and the v2 api will know the request ip address.

Thank you



Reply with quote | Report
Post Re: IP Address Update
by rahsharma on mercredi 8 juin 2022

devankistan wrote:Hello,

I am trying to use your v2 API and want to update the IP address from my server.
On the page: https://www.dynu.com/Support/API#/
I am using POST: /dns/{id} Update an existing DNS service.

I am looking to have the ip address set to my public ip address. However when I leave or set to null the ipv4Address property in the json payload, the ip in the control panel is not update. How can I get your API to use the client ip address automatically using a v2 request?

Note: It does work if I specify an IPAddress when I make my call when I am testing. However in production, I won't know what the public ipaddress is and the v2 api will know the request ip address.

Thank you


There are two ways to accomplish what you are trying to do.

1. Use the IP Update protocol (Details at https://www.dynu.com/DynamicDNS/IP-Update-Protocol). If you want to update IP address for a few domain names together, put them into a 'group' (aka location) and then specify the group (aka location) in the IP update URL.

2. To use the /v2 API, you can first detect the IPv4 and IPv6 addresses using the following two URLs and then include it in the POST call to /v2/dns/{id}

http://checkip.dynu.com
http://checkipv6.dynu.com

Reply with quote | Report
Post Re: IP Address Update
by devankistan on mercredi 8 juin 2022

Hey, Ye, I already figured that out and did just that.

So I am making that extra API call. Was just wondering if I could get away without it

Thanks

Reply with quote | Report
dimanche 17 novembre 2024 20:40
Loading...