The TokenDNS NodeJS module is ready

Integrating the TokenDNS API into your application should be as easy as possible. We created a small and fast nodejs plugin that you can use to get started. There is nothing more to say than, check our docs, grab the module from github and look at this example:

var TokenDNS = require('index.js')
var apiKey = 'YOURAPIKEY';

var tokenDnsClient = new TokenDNS(apiKey)

tokenDnsClient.registerDomain({
    apikey: apiKey,
    action: 'add',
    domain: 'example.com',
    method: 'email',
    email: 'webmaster@example.com',
    billing: 'yearly',
    },function(err, res) {
        console.log(res.status);
});

Have fun and let us know when you run in a bug šŸ™‚

We love the Insomnia REST Client

We love APIs and the Insomnia REST Client is perfect to test new things.Ā You can use it for free and is available for Linux, MacOSX and Windows.

Sometimes it is just easier to get started when you have something onĀ hands. Grab our Insomnia configuration for our TokenDNS API on github and start playing. Add your apikey and domainĀ after importing to get started.

Its never been easier to get productive.

How to use Google Cloud with TokenDNS

When you are using the Google Cloud Platform, you want to automate as much as possible. We want to help!

Starting a new machine in GCE is not a difficult thing and luckily it’s possible to supply a startup script and some metadata to automate the registration of the new machine with TokenDNS.

Configure Startup Script

We need to use a little helper script to make the dnsĀ registration. Don’t worry we published itĀ on github.com for you to grab. TheĀ register_tokendns.shĀ script will get executed when the VM startsĀ and useĀ some metadata information that we configured to register it with TokenDNS.
Copy the content of the register_tokendns.sh script and paste it in the Startup Script section when you add a new virtual machine.

Add Metadata

The metadata that we configure are apikey and domain. These are necessary information that you need to provide, otherwise the registration will fail. It would be possible to extend the script to add e.g. tags.

Lets have a look at the Console in the Google Cloud how it should look:

If you want to learn more about GCE and Startup scripts you can look here. They even tell you how to use the CLI and scripts šŸ˜‰

You own your data. Here is how to export them!

We believe that you should be able to access your data anytime you want. Most DNS provider does not give you the possibility to export all your records without knowing them. You should be able to do so anyways.
That’s why we implemented an export function for all your records. This makes it easier to keep an eye on them and makeĀ an backup of your records (just in case).

Request:

curl --get "https://api.tokendns.co/v1/export" \
  -d apikey=${apikey} \
  -d action=records \
  -d domain=${domain}

Response:

{
  "status": "200",
  "domain": "blabladns.xyz",
  "records": [
    [
      {
        "name": "blabladns.xyz",
        "type": "TXT",
        "content": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFPb9PnIJB8z2Ev+C+jmNPVVLxGMeqDNKOoa9/9R/C6rgRkLcxFHAB4ibbr7h7ybngirME0jsn4ZgBsweaRSfqdj5Arka1luqEAKxaBW6K6pi9HDvRpWQzFdwQriUcWyyIVsCjYEQLZJdZOD8nX9sJk5u+ihlumstZaTIIUFA/jQIDAQAB",
        "ttl": "300",
        "change_date": "1485196067",
        "tag": ""
      },
      {
        "name": "asd.blabladns.xyz",
        "type": "A",
        "content": "127.0.0.5",
        "ttl": "300",
        "change_date": "1471774941",
        "tag": ""
      },
      {
        "name": "asd.blabladns.xyz",
        "type": "A",
        "content": "10.10.10.10",
        "ttl": "300",
        "change_date": "1485419347",
        "tag": ""
      },
      {
        "name": "facebook.blabladns.xyz",
        "type": "A",
        "content": "188.166.134.65",
        "ttl": "300",
        "change_date": "1469030691",
        "tag": ""
      },
      {
        "name": "facebook.blabladns.xyz",
        "type": "MX",
        "content": "127.0.0.1",
        "ttl": "300",
        "change_date": "1469030795",
        "tag": ""
      },
      {
        "name": "insomnia.blabladns.xyz",
        "type": "A",
        "content": "178.62.218.50",
        "ttl": "300",
        "change_date": "1481653536",
        "tag": "website"
      },
      {
        "name": "www.blabladns.xyz",
        "type": "A",
        "content": "8.8.8.8",
        "ttl": "300",
        "change_date": "1469028995",
        "tag": ""
      },
      {
        "name": "www3.blabladns.xyz",
        "type": "A",
        "content": "127.0.0.12",
        "ttl": "300",
        "change_date": "1483823787",
        "tag": "website"
      }
    ]
  ]
}

API Documentation and our Libraries are updated and ready to get explored.