Echolo

The Echolo Developer Hub

Welcome to the Echolo developer hub. You'll find comprehensive guides and documentation to help you start working with Echolo's IoT Platform as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Authentication

Getting started with the Echolo REST API

Before Authentication

Before you are able to Authenticate with the Echolo REST API you will need three items:

Header Value
Description

app-id

The appId of your application.

secret

When your application is created, your secret is also given to you with your appId.

x-api-key

When your application is registered, an api-key is generated along with your appId and secret.

If you do not have the above-mentioned credentials please create an account on the Echolo IoT Platform.

Authentication

This API implements key based authentication. Your application must supply valid credentials in the header of each request. Before accessing resources of the API you must first authenticate by making a request for an access token. This authentication process will exchange your API Secret for a reusable token that must then be supplied in all subsequent requests along with your app-id and x-api-key.

Tokens

Echolo REST API uses temporary tokens used to validate your request, in the process of working with this API you may run into the following errors.

Token Experation

Access Tokens are valid for 2 hours, your application should catch authentication failures resulting from token expiration and handle requesting a new Access Token as needed.

Token is Expired:

{
    "error": "Your application token has expired, please renew /token"
}

The token is Missing:

{
    "error": "Missing valid token."
}

Sample request for Token

var request = require("request");

var options = { method: 'POST',
  url: 'https://api.echolo.io/v1/application/token',
  headers: 
   { 'x-api-key': 'x-api-key',
     'app-id': 'app-id',
     secret: 'secret' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(JSON.parse(body.token));
});

Required Headers

Name
Type
Description

app-id

String

Also known as your appId or application ID.

secret

String

After using the /token method this is attached to all requests.

x-api-key

String

A static key used to authenticate you with your token and app-id.

Sample token Response

The entire application object is returned when a valid token is created.

{
    "secret": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "createdAt": "2017-08-05T03:39:04.106Z",
    "appId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjcmVhdGVkQXQiOiIyMDE4LTAzLTE1VDAxOjUxOjM2LjgzOFoifQ.8Q7w3OVjINawWgBKNj2NnkVkhLiiZ0XxOf84vvMOyj4",
    "name": "My App",
    "updatedAt": "2017-03-15T01:51:36.904Z"
}

Authentication


Getting started with the Echolo REST API

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.