Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Namecheap API key not working

    Support
    namecheap dns
    4
    20
    1387
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by girish

      I was having issues with cloudron creating new domains via the namecheap api so I figured I would try changing the API key and resetting the key for all of my domains. Turns out this was a bad idea because I hit this 400 error when trying to save the new key:
      Screen Shot 2020-12-04 at 3.45.15 PM.png

      Has anyone else encountered this? For further context I have changed my IP recently, but I made sure to update my whitelisted IP on namecheap and change all of my records for my domains.

      marcusquinn girish 2 Replies Last reply Reply Quote 0
      • marcusquinn
        marcusquinn @Guest last edited by

        @atrilahiji reset the API Key? Maybe it's tied to the prior whitelist?

        • https://ap.www.namecheap.com/settings/tools/apiaccess/

        We're not here for a long time - but we are here for a good time :)
        Jersey/UK
        Work & Ecommerce Advice: https://brandlight.org
        Personal & Software Tips: https://marcusquinn.com

        ? 1 Reply Last reply Reply Quote 0
        • girish
          girish Staff @Guest last edited by

          @atrilahiji Anything in the box logs? /home/yellowtent/platformdata/logs/box.log.

          ? 2 Replies Last reply Reply Quote 0
          • ?
            A Former User @girish last edited by

            @girish Screen Shot 2020-12-04 at 4.10.13 PM.png

            Heres the most recent bit. Not worried about my IP being out there anyone can find it by looking up my domains anyways.

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @marcusquinn last edited by

              @marcusquinn The API key should work with my current whitelist. Just went through and removed the IP from the whitelist, disabled API access, re-enabled it, added my IP, and generated a new key. Same issue.

              1 Reply Last reply Reply Quote 1
              • ?
                A Former User @girish last edited by

                @girish Let me know if you want SSH access. I can enable it if that helps at all.

                girish 1 Reply Last reply Reply Quote 0
                • girish
                  girish Staff @Guest last edited by girish

                  @atrilahiji I think the issue is something else (not cloudron related). It says "API Key is invalid or API access has not been enabled").

                  Try running a simple curl command like this on the server or your laptop:

                  curl 'https://api.namecheap.com/xml.response?ApiUser=cloudron&ApiKey=your_api_key&UserName=cloudron&Command=namecheap.domains.getList&ClientIp=1.2.3.4'
                  

                  You have to substitute ApiUser and UserName with your namecheap username. Client IP is your laptop's IP or the Cloudron IP (depending on where you run the above command). What do you get?

                  I get something like:

                  <?xml version="1.0" encoding="utf-8"?>
                  <ApiResponse Status="OK" xmlns="http://api.namecheap.com/xml.response">
                    <Errors />
                    <Warnings />
                    <RequestedCommand>namecheap.domains.getlist</RequestedCommand>
                    <CommandResponse Type="namecheap.domains.getList">
                      <DomainGetListResult>
                  ...
                      </DomainGetListResult>
                      <Paging>
                        <TotalItems>1</TotalItems>
                        <CurrentPage>1</CurrentPage>
                        <PageSize>20</PageSize>
                      </Paging>
                    </CommandResponse>
                    <Server>PHX01APIEXT03</Server>
                    <GMTTimeDifference>--5:00</GMTTimeDifference>
                    <ExecutionTime>0.082</ExecutionTime>
                  </ApiResponse>
                  
                  ? 1 Reply Last reply Reply Quote 0
                  • BrutalBirdie
                    BrutalBirdie Staff last edited by BrutalBirdie

                    I had this issue once, double check if there is a space at the end or front.

                    Like my work? Consider donating a beer 🍻 Cheers!

                    1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @girish last edited by A Former User

                      @girish That works. Still having issues in the UI though.

                      And also, looks like I can add new domains. I only get this error updating existing domains. Trouble is, I have emails with important info on these domains so I can't remove the domains and re-add them.

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @Guest last edited by

                        @atrilahiji That is strange then, can you enable SSH and send a mail to support@cloudron.io ? I can take a look.

                        ? 1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User @girish last edited by A Former User

                          @girish Sent. Just to let you know (its in the email) but I changed my main domain to the domain I was able to add as a test, but now I get the same error when trying to change my main domain back to lahijiapps.dev. 😞

                          I suspect this has quite a bit to do with my IP changing when we got a new router.

                          girish 2 Replies Last reply Reply Quote 0
                          • girish
                            girish Staff @Guest last edited by

                            @atrilahiji What I found is that the curl call fails most of the time but works now and then.

                            <?xml version="1.0" encoding="utf-8" ?>
                            <ApiResponse Status="ERROR">
                              <Errors>
                                <Error Number="500000">Too many requests</Error>
                              </Errors>
                              <Server/>
                              <GMTTimeDifference/>
                              <ExecutionTime>0</ExecutionTime>
                            </ApiResponse>
                            

                            Searching for above I see https://whmcs.community/topic/303288-namecheap-domain-sync-error-too-many-requests/ and https://github.com/adamdecaf/terraform-provider-namecheap/issues/9

                            ? 1 Reply Last reply Reply Quote 0
                            • girish
                              girish Staff @Guest last edited by

                              @atrilahiji So, if I am "patient" and put the key one by one in your domains it does work. For example, I succeeded updating the key for the first domain as well.

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User @girish last edited by A Former User

                                @girish Weird...

                                I'm seeing this when I try to change the domain back.
                                Screen Shot 2020-12-04 at 6.17.10 PM.png

                                I suppose this would be due to the rate limiting?

                                girish 1 Reply Last reply Reply Quote 0
                                • girish
                                  girish Staff @Guest last edited by

                                  @atrilahiji Yes, correct. The DNS calls are failing . I think as a first step, change the keys to the new key (just give 10 mins between updating each domain, it seems to work). After you have switched them over, then change the dashboard domain. It should work.

                                  Also, per https://www.namecheap.com/support/knowledgebase/article.aspx/9739/63/api--faq#z, it seems

                                  "Our general API calls restriction is 20/min, 700/hour and 8000/day across the whole key."

                                  I don't think we make 20 per min, maybe something on their side is enforcing limits wrongly?

                                  ? 2 Replies Last reply Reply Quote 0
                                  • ?
                                    A Former User @girish last edited by

                                    @girish I'm in a support chat with them seeing if they can figure out what the heck is going on. Their support is painful but hopefully they get this sorted.

                                    1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User @girish last edited by

                                      @girish Lol they just said "fuck it" and doubled my quota. Testing it out.

                                      BrutalBirdie 1 Reply Last reply Reply Quote 2
                                      • ?
                                        A Former User last edited by

                                        This can be resolved. Thanks for the help @girish!

                                        1 Reply Last reply Reply Quote 0
                                        • BrutalBirdie
                                          BrutalBirdie Staff @Guest last edited by

                                          @atrilahiji said in Namecheap API key not working:

                                          @girish Lol they just said "fuck it" and doubled my quota. Testing it out.

                                          Classic namecheap support 😄

                                          Like my work? Consider donating a beer 🍻 Cheers!

                                          marcusquinn 1 Reply Last reply Reply Quote 0
                                          • marcusquinn
                                            marcusquinn @BrutalBirdie last edited by

                                            @brutalbirdie Yeah, I tried their Ghost hosting once, until I found how far behind their version updating lagged, which led me to discover Cloudron 😄

                                            We're not here for a long time - but we are here for a good time :)
                                            Jersey/UK
                                            Work & Ecommerce Advice: https://brandlight.org
                                            Personal & Software Tips: https://marcusquinn.com

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Powered by NodeBB