{"id":121,"date":"2023-10-13T22:58:47","date_gmt":"2023-10-13T14:58:47","guid":{"rendered":"https:\/\/blog.quantoyo.com\/?p=121"},"modified":"2024-06-03T10:21:59","modified_gmt":"2024-06-03T02:21:59","slug":"godaddy-%e5%8b%95%e6%85%8b%e8%a8%ad%e5%ae%9a%e5%b0%8d%e6%87%89ip","status":"publish","type":"post","link":"https:\/\/blog.quantoyo.com\/?p=121","title":{"rendered":"GoDaddy \u52d5\u614b\u8a2d\u5b9a\u5c0d\u61c9IP"},"content":{"rendered":"\n<p>\u5728\u6c92\u6709\u56fa\u5b9aIP\u7684\u60c5\u6cc1\u4e0b\uff0c\u5229\u7528shell script \u5b9a\u6642\u66f4\u65b0GoDaddy\u4e0a\u9762\u7db2\u5740\u7684\u5c0d\u61c9IP\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u4ee5\u4e0b\u5c07\u4f7f\u7528 Synology NAS \u8a2d\u5b9a<\/p>\n\n\n\n<p>\u767b\u5165\u5f8c\uff0c\u9032\u5165\u63a7\u5236\u53f0\/\u4efb\u52d9\u6392\u7a0b\u8868<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/\u622a\u5716-2023-10-13-\u4e0b\u534810.35.20.png\" alt=\"\" class=\"wp-image-122\" width=\"212\" height=\"193\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/\u622a\u5716-2023-10-13-\u4e0b\u534810.35.20.png 488w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/\u622a\u5716-2023-10-13-\u4e0b\u534810.35.20-300x273.png 300w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/\u622a\u5716-2023-10-13-\u4e0b\u534810.35.20-150x136.png 150w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/figure>\n\n\n\n<p>\u65b0\u589e\/\u6392\u7a0b\u4efb\u52d9\/\u4f7f\u7528\u8005\u5b9a\u7fa9\u6307\u4ee4\u78bc<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image.png\" alt=\"\" class=\"wp-image-123\" width=\"234\" height=\"153\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image.png 536w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-300x196.png 300w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-150x98.png 150w\" sizes=\"auto, (max-width: 234px) 100vw, 234px\" \/><\/figure>\n\n\n\n<p>\u8f38\u5165\u76f8\u95dc\u8cc7\u8a0a\uff0c\u4e26\u4ee5root\u6b0a\u9650\u57f7\u884c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-1.png\" alt=\"\" class=\"wp-image-124\" width=\"295\" height=\"149\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-1.png 874w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-1-300x152.png 300w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-1-150x76.png 150w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-1-768x390.png 768w\" sizes=\"auto, (max-width: 295px) 100vw, 295px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-2.png\" alt=\"\" class=\"wp-image-125\" width=\"296\" height=\"351\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-2.png 844w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-2-253x300.png 253w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-2-126x150.png 126w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-2-768x912.png 768w\" sizes=\"auto, (max-width: 296px) 100vw, 296px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-3.png\" alt=\"\" class=\"wp-image-126\" width=\"301\" height=\"332\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-3.png 1034w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-3-272x300.png 272w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-3-136x150.png 136w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-3-768x848.png 768w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/figure>\n\n\n\n<p>\u4e26\u5728\u201c\u4f7f\u7528\u8005\u5b9a\u7fa9\u6307\u4ee4\u78bc\u201d\u4e2d\u8f38\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code has-light-gray-background-color has-background has-small-font-size\"><code>#!\/bin\/bash\n# This script checks and automatically updates your GoDaddy DNS \"A\" record server with your current IP address.\n# by Marius Bogdan Lixandru updated to make it work with Synology NAS for users with Dynamic IP.\ndomain=\"quantoyo.com\"   # Your own domain name\nname=\"\u9019\u908a\u662f\u8981\u4fee\u6539\u7684name\"     # name of A record to update\nkey=\"\u9019\u908a\u662f\u5f9eGoDaddy\u53d6\u5f97\u7684key\"     # Your own GoDaddy developer API Key See STEP 4\nsecret=\"\u9019\u908a\u662f\u5f9eGoDaddy\u53d6\u5f97\u7684secret\"   # Your own GoDaddy developer API Secret Key See STEP 4\n\nheaders=\"Authorization: sso-key $key:$secret\"\n\n# echo $headers\n\nresult=$(curl -s -X GET -H \"$headers\" \\\n \"https:\/\/api.godaddy.com\/v1\/domains\/$domain\/records\/A\/$name\")\n\n#echo $result;\n\ndnsIp=$(echo $result | grep -oE \"\\b(&#91;0-9]{1,3}\\.){3}&#91;0-9]{1,3}\\b\")\n#echo \"dnsIp:\" $dnsIp\n\n# Get public IP address. There are several websites that can do this.\nret=$(curl -s GET \"https:\/\/ipinfo.io\/json\")\ncurrentIp=$(echo $ret | grep -oE \"\\b(&#91;0-9]{1,3}\\.){3}&#91;0-9]{1,3}\\b\")\n\n\n#echo \"currentIp:\" $currentIp\n\nif &#91; \"$dnsIp\" != \"$currentIp\" ];\n then\n#\techo \"Ips are not equal\"\n\trequest='&#91;{\"data\":\"'$currentIp'\",\"ttl\":600}]'\n#\techo \" request:\" $request\n\tnresult=$(curl -i -s -X PUT \\\n -H \"$headers\" \\\n -H \"Content-Type: application\/json\" \\\n -d $request \"https:\/\/api.godaddy.com\/v1\/domains\/$domain\/records\/A\/$name\")\n#\techo \"result:\" $nresult\nfi<\/code><\/pre>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u662f\u5230GoDaddy\u53d6\u5f97\u4e0a\u8ff0\u8cc7\u8a0a\u7684\u65b9\u6cd5<\/p>\n\n\n\n<p>Step1. \u9032\u5165GoDaddy \u958b\u767c\u8005\u9801\u9762\u4e26\u767b\u5165<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.godaddy.com\/keys\">https:\/\/developer.godaddy.com\/keys<\/a><\/p>\n\n\n\n<p>\u9ede\u64caCreate Key<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4.png\" alt=\"\" class=\"wp-image-127\" width=\"389\" height=\"52\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4.png 2202w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4-300x40.png 300w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4-150x20.png 150w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4-768x103.png 768w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4-1536x205.png 1536w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-4-2048x273.png 2048w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/figure>\n\n\n\n<p>\u8f38\u5165name \u4e26\u9078\u64c7production<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-5.png\" alt=\"\" class=\"wp-image-128\" width=\"387\" height=\"411\" srcset=\"https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-5.png 802w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-5-282x300.png 282w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-5-141x150.png 141w, https:\/\/blog.quantoyo.com\/wp-content\/uploads\/2023\/10\/image-5-768x816.png 768w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/figure>\n\n\n\n<p>\u53d6\u5f97 key \u8207secret \u5f8c\uff0c\u8ddf\u4e0a\u9762\u6307\u5b9a\u7684name \u4e09\u500b\u8cc7\u8a0a\u586b\u5165\u4e0a\u9762\u7684\u7a0b\u5f0f\u78bc\u4e2d\u5373\u53ef\u81ea\u52d5\u66f4\u65b0IP<\/p>\n\n\n\n<p>\u53c3\u8003\u8cc7\u6599\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/mariushosting.com\/synology-how-to-automatically-update-godaddy-a-record-if-you-have-dynamic-ip\/\">https:\/\/mariushosting.com\/synology-how-to-automatically-update-godaddy-a-record-if-you-have-dynamic-ip\/<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u66f4\u65b0\uff1a GoDaddy \u5df2\u7d93\u53d6\u6d88\u8a72API \u5c0d\u65bc\u5c0f\u7528\u6236\u7684\u652f\u63f4\uff0c\u7576\u5e33\u865f\u5167\u7684domain\u4f4e\u65bc50 \u500b\u5c07\u88ab\u963b\u64cb\u4f7f\u7528\u6b64API\uff0c\u4e26\u6536\u5230\u4ee5\u4e0b\u8a0a\u606f<\/p>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>{\"code\":\"ACCESS_DENIED\",\"message\":\"Authenticated user is not allowed access\"}<\/code><\/pre>\n\n\n\n<p>\u9019\u662fReddit \u4e0a\u7db2\u53cb\u8a62\u554f\u5b98\u65b9\u7684\u56de\u61c9\uff0c\u4e0d\u5f97\u4e0d\u8aaaGodaddy \u975e\u5e38\u4e0d\u53cb\u5584\u5462&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>I had the same issue. Emailed API support. This is the response I get.\n\n\" Hi,\n\nThank you for reaching out to us regarding the recent changes to our Domain API.\n\nWe wanted to inform you that we have recently updated our Domain API requirements. As part of this update, customers are now required to have 50 or more domains in their account to utilize the API. Unfortunately, as you currently only have 1 domain in your account, access to the API is blocked for you.\n\nHowever, we want to assure you that you still have access to the OTE API without any blocks.\n\nWe apologize for any confusion or inconvenience this may have caused. If you have any further questions or need assistance with any other aspect of our services, please don't hesitate to reach out.\n\nThank you for your understanding.\n\nRegards,\n\nAPI Support Team\"<\/code><\/pre>\n\n\n\n<p>\u53c3\u8003\u8cc7\u6599\uff1ahttps:\/\/www.reddit.com\/r\/godaddy\/comments\/1bl0f5r\/am_i_the_only_one_who_cant_use_the_api\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u6c92\u6709\u56fa\u5b9aIP\u7684\u60c5\u6cc1\u4e0b\uff0c\u5229\u7528shell script \u5b9a\u6642\u66f4\u65b0GoDaddy\u4e0a\u9762\u7db2\u5740\u7684\u5c0d\u61c9IP\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[177,179,21,178,22],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-technology","tag-access_denied","tag-authenticated","tag-godaddy","tag-not-allowed","tag-synology"],"_links":{"self":[{"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":5,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":1318,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions\/1318"}],"wp:attachment":[{"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.quantoyo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}