• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    New

    My domain does not work with API

    Hi, I just tested the API from https://developer.godaddy.com/doc#!/_v1_domains/recordAdd/ArrayOfDNSRecord

    the domain "000.biz"(I found from other post) works very well,but with the same parameters my domain "thewhitesea.com" does not work, it response the message below:   {"code":"UNKNOWN_DOMAIN","message":"The given domain is not registered, or does not have a zone file","name":"_Class"}  

    Does API only works on reseller account?

    7 REPLIES 7
    Helper VI
    Helper VI

    Re: My domain does not work with API

    Hi @Cleve, in order to use the api for your domain, you need to create your api keys.

    Have you done that?

    If not, you can create them here.

     

    Hope it helps!

     

     

    If you find my replies helpful, give me a like or kudo 🙂
    And if I solved your issue, mark it as solution 😄
    New

    Re: My domain does not work with API

    Hi jpablo, thanks for your reply.

    I did create my api keys, but my test is through godaddy doc website "try it" with sso-key.

    sso-key UzQxLikm_46KxDFnbjN7cQjmw6wocia:46L26ydpkwMaKZV6uVdDWe

    I also tried my another domain which also does not work with api.

    You can check the pictures below.

     

    000.biz.png

     

     

     

     

    whitesea.png

    Highlighted
    Helper VI
    Helper VI
    Solution

    Re: My domain does not work with API

    Hi @Cleve, I see what you mean...

    You won't see it from there, because the requests are for the domains that the testing account has. Which you can check here.

    In order to work with your domain, you will need to do it from an external source (ie. terminal or PHP script, etc.) with your api keys.

     

    Hope it helps!

     

     

    If you find my replies helpful, give me a like or kudo 🙂
    And if I solved your issue, mark it as solution 😄
    New

    Re: My domain does not work with API

    Many thanks, it did get correct response from https://api.godaddy.com/v1/  

    I am not able to add Custom NS record for my new Domain

    Hi,

    I am using Godaddy API for updated the DNS data with Custom AWS route53 NS records.

    I have try to update DNS records with AWS rount53 NS data using Godaddy API but its return following error:

    ****************************************************

    [message:protected] => Client error: `PATCH https://api.godaddy.com/v1/domains/esc-447pleasanthillroad.com` resulted in a `422 Unprocessable Entity` response:
    {"code":"FAILED_NAME_SERVER_VALIDATION","message":"Failed to update nameservers","name":"ApiError"}
    [string:Exception:private] =>
    [code:protected] => 422
    [file:protected] => /var/www/html/sites/all/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
    [line:protected] => 107
    [trace:Exception:private] => Array


    ****************************************************

    I have sending following data to api:

     

    (
                        [file] => /xxxxxx/xxxxxxx/xxxxxxxxxxxxxxxxx/xxxxx_register.php
                        [line] => 1091
                        [function] => patch
                        [class] => GuzzleHttp\Client
                        [type] => ->
                        [args] => Array
                            (
                                [0] => /v1/domains/esc-447pleasanthillroad.com
                                [1] => Array
                                    (
                                        [headers] => Array
                                            (
                                                [Authorization] => sso-key xxxxxxxxx:xxxxxxxxxxxx
                                                [Accept] => application/json
                                            )
    
                                        [json] => Array
                                            (
                                                [nameServers] => Array
                                                    (
                                                        [0] => custom
                                                        [1] => ns-1511.awsdns-60.org.
                                                        [2] => ns-902.awsdns-48.net.
                                                        [3] => ns-362.awsdns-45.com.
                                                        [4] => ns-1680.awsdns-18.co.uk.
                                                    )
    
                                            )
    
                                    )
    
                            )
    
                    )


    please note all other section is working fine,
    please note when I added NS data manually in Godaddy account its working.

    Re: My domain does not work with API

    API : https://api.ote-godaddy.com/v1/domains/xyz.com/records

    Header : 

    Authorization:sso-key mykey:secret
    Accept:application/json

     

    Using above credentials I am hitting the API from Postman(client) but getting below response,

     

    {
    "code": "UNABLE_TO_AUTHENTICATE",
    "message": "Unauthorized : Could not authenticate API key/secret"
    }

     

     

    Re: My domain does not work with API

    I'm also having trouble to add or update dns and i'm getting this error "Error connecting to the API (https://api.ote-godaddy.com/v1/domains/d5fgd20.com/records)". Not able to rectify it so help me please.