Get the 1&1 Cloudserver Node.js SDK

Table of Contents


The 1&1 Node.js SDK is a Node.js library designed for interaction with the 1&1 cloud platform over the REST API.

This guide contains instructions on getting started with the library and automating various management tasks available through the 1&1 Cloud Panel UI.

To view or contribute to this project, visit the GitHub repository.


This SDK is a wrapper for the 1&1 REST API written in Node.js. All operations against the API are performed over SSL and authenticated using your 1&1 token key. The Node.js library facilitates the access to the REST API within an instance running on 1&1 platform.

For more information on the 1&1 Cloud Server for Node.js, visit the Community Portal.

Getting Started

Before you begin you will need to have signed up for a 1&1 account. The credentials you create during sign-up will be used to authenticate against the API.

The Node.js Client Library is available on npm. You can install the latest stable version using npm:


The official Node.js library is available from the 1&1 GitHub account found here.


Set the authentication token and create the API client:


Set the url of the API as follows as follows


Error Handling

Please note that the 1&1 API always returns the error message in the body of the response, in the testhelper.js there is the method below, check its usages for how to handle errors:

//expectedStatus you pass this parameter to define what is the expected http status code
//response is the parameter returned from the 1&1 response
helper.assertNoError = function (expectedStatus, response, callback) {
    callback(expectedStatus == response.statusCode);

Updated 6/29/17


Tags: Node.js