Help Center
Login Sign up
  1. Home
  2. API reference
  3. General API basics

Authentication

API reference (XML/JSON) · Updated 2024-05-29

Introduction

The Domainrobot API offers different possibilities of authentication. Depending on the selected API, the following authentication options are available:

  • Credentials (user/context/password)
    For JSON and XML
  • Two-Factor Authentication
    For XML only

JSON API

Authentication via credentials (username/password/context)

Authentication with the AutoDNS user name and your AutoDNS context. You must define the password yourself.

User ($user) and password ($password) are specified as Basic Auth. The context is specified here via the header X-Domainrobot-Context.

Note the context numbers. Context "1" refers to the demo system, context "4" or the PersonalAutoDNS context number, the live system.

Example Http-Header :

You have to pass the following http header for the username "user", the password "password" and the context "4":

  • Authorization: Basic dXNlcjpwYXNzd29yZA==
  • X-Domainrobot-Context: 4

More information about Basic Auth can be found at : https://en.wikipedia.org/wiki/Basic_access_authentication

XML API

Authentication via credentials (Username/Password/Context)

Note the context numbers. Context "1" refers to the demo system, context "4" or the PersonalAutoDNS context number, the live system.

Authentication with the AutoDNS user name and your AutoDNS context. You must define the password yourself. It is entered in the auth block in the <password> tag.

<auth>
	<user>USER</user>
	<context>CONTEXT</context>
	<password>PASSWORD</password>
</auth>

Authentication via two-factor authentication (2FA)

With the 2FA, a six-digit numerical code, the so-called token, must be entered in addition to the user name and password.

Create Token

The token is generated using the time-based One-time Password Algorithm (RFC 6238).

Use Token

The token is entered in the auth block in the <token< tag.

<auth>
	<user>USER</user>
	<context>CONTEXT</context>
	<password>PASSWORD</password>
	<token>TOKEN</token>
</auth>