Namecheap API key not working
-
@atrilahiji reset the API Key? Maybe it's tied to the prior whitelist?
-
@atrilahiji Anything in the box logs?
/home/yellowtent/platformdata/logs/box.log
. -
Heres the most recent bit. Not worried about my IP being out there anyone can find it by looking up my domains anyways.
-
@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.
-
@girish Let me know if you want SSH access. I can enable it if that helps at all.
-
girish Staffreplied to A Former User on Dec 4, 2020, 11:25 PM last edited by girish Dec 4, 2020, 11:25 PM
@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>
-
BrutalBirdie Partnerwrote on Dec 4, 2020, 11:52 PM last edited by BrutalBirdie Dec 4, 2020, 11:52 PM
I had this issue once, double check if there is a space at the end or front.
-
A Former Userreplied to girish on Dec 5, 2020, 12:47 AM last edited by A Former User Dec 5, 2020, 12:48 AM
@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.
-
@atrilahiji That is strange then, can you enable SSH and send a mail to support@cloudron.io ? I can take a look.
-
A Former Userreplied to girish on Dec 5, 2020, 1:01 AM last edited by A Former User Dec 5, 2020, 1:02 AM
@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.
-
@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
-
@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.
-
A Former Userreplied to girish on Dec 5, 2020, 1:20 AM last edited by A Former User Dec 5, 2020, 1:20 AM
@girish Weird...
I'm seeing this when I try to change the domain back.
I suppose this would be due to the rate limiting?
-
@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?
-
@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.
-
@girish Lol they just said "fuck it" and doubled my quota. Testing it out.
-
This can be resolved. Thanks for the help @girish!
-
@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
-
@brutalbirdie Yeah, I tried their Ghost hosting once, until I found how far behind their version updating lagged, which led me to discover Cloudron
11/20