API Authentication (en)

Authenticate to start developing with the WalkInsights APIs.

Overview

To use the WalkInsights API, you must authenticate yourself. This document describes how to authenticate with API requests.

🚧

It requires WalkInsights service account

If you dont't have WalkInsights service account yet, please contact our support departure([email protected]).

Step 1: Get an authentication token

You must get text named authentication token to use all of APIs provided by WalkInsights, which can be retrieved by Sign-In API. After once retrieving the token, you can keep it for next requests thanks to immutability of token.

🚧

Please keep authentication token safely because which is unique for each account.

Request authentication token

Request authentication token is an HTTP URL of the following form:

📘

https://api.walkinsights.com/api/v1/users/sign_in

[form-data]
user[email] : YOUR_EMAIL
user[password] : PASSWORD

Retrieve authentication token

A response contains user object which has authentication_token field.

{
  "user": {
    "email": "[email protected]",
    "mobile_number": "+821012345678",
    "enable_sms_notification": false,
    "locale": "",
    "authentication_token": "JGBZhPPiVw4zY5gAecz5",
    "id": 123,
    "name": "Someone John Doe",
    "role": "admin",
    "image_thumb_url": "...",
    "image_original_url": "..."
  }
}

Retrieve authentication token in WalkInsights website

You can get same response above section by request Users/Me API after logging-in WalkInsights website. In this case, you don't need a HTTP REST client application but your web browser will show you a same result because your browser have session already.

📘

Enter the URL below in your web browser

https://api.walkinsights.com/api/v1/users/me

When you are going to use HTTP REST client application, you must set HTTP Header like below:

[headers]
X-User-Email : YOUR_EMAIL
X-User-Token : YOUR_AUTHENTICATION_TOKEN

Step 2: Set the authentication token to API request

When loading the WalkInsights API, substitute YOUR_EMAIL and YOUR_AUTHENTICATION_TOKEN in the HTTP header below with the authentication token you got from the previous step.

[headers]
X-User-Email : YOUR_EMAIL
X-User-Token : YOUR_AUTHENTICATION_TOKEN

Use REST client

WalkInsights provides REST client for your convenience.

Java

Rest Client - Java