hughdavenport / letsencrypt-iwantmyname-hook

Allows you to use letsencrypt.sh and DNS challenge response with the iwantmyname registrar
MIT License
9 stars 1 forks source link

No need to scrape the page, just use the DDNS API #1

Open norbu09 opened 8 years ago

norbu09 commented 8 years ago

I've made a few changes to the DDNS API recently that should make this process way simpler (one HTTP call).

The basics are lined out here: https://iwantmyname.com/developer/domain-dns-api

I have added the parameters type and value to enable adding TXT records for letsencrypt validation so something like this should work:

curl -u "[username]:[password]" \
          "https://iwantmyname.com/basicauth/ddns?hostname=[hostname]&type=TXT&value=[secret]"

If you have issues with this please get in touch, would be keen to promote your script on our page.

hughdavenport commented 8 years ago

Ah cool, I saw that before, but didn't have the type and value. I'll give that a test and see what happens. Would be good to get away from manual scraping! Accidentally removed all the entries for a domain because didn't do the get to dns/list/ before the dns/add during first testing lol.

I'll make another issue for having 2factor auth turned on which someone mentioned to me irl. Might have to nut that one out with you irl sometime.

Cheers,

Hugh

hughdavenport commented 8 years ago

That didn't work for me, added an A record with my IP, for that hostname.

Also, username is an email with a "@" character in it. I thought that was "special" in terms of a URL for basic auth? Maybe just in the password?

Otherwise I've pushed this to the api branch, commit 3ad1cfbc93cf8ab9f3d99a711639319b649b9989

Cheers,

Hugh