Namecheap API key not working
-
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:
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.
-
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:
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.
@atrilahiji reset the API Key? Maybe it's tied to the prior whitelist?
-
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:
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.
-
Heres the most recent bit. Not worried about my IP being out there anyone can find it by looking up my domains anyways.
-
@atrilahiji reset the API Key? Maybe it's tied to the prior whitelist?
@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 Let me know if you want SSH access. I can enable it if that helps at all.
@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>
-
I had this issue once, double check if there is a space at the end or front.
-
@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>
@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 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.
@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 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
-
@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
@girish Weird...
I'm seeing this when I try to change the domain back.
I suppose this would be due to the rate limiting?
-
@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?
-
@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.
-
@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 Lol they just said "fuck it" and doubled my quota. Testing it out.
-
This can be resolved. Thanks for the help @girish!
-
@girish Lol they just said "fuck it" and doubled my quota. Testing it out.
@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
-
@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