How to try our APIs in "Try It" playground

Readme.io has a nice feature to try an API on the right panel. Here we take the example of Smart Home APIs to show you how to try our APIs in readme.io:

  • Most of APIs require Bear token for authentication
  • You need to first try Agent login API to get a token
  • When you try other API, copy this token into Bear area on the top of right panel

Get Bear authentication token

The following are a list of steps to get Bear token:

  1. Select Agent → Login API from left menu.

  2. In middle section, Under BODY PARAMS:

    1. You will get grant_type is having default value as ‘password’.

    2. Type to fill up value for username.

    3. Type to fill up value for password.

  3. After doing above mention things, in Right section, you will see Request Example is formed as:

461
  1. Now click on ‘Try It!’ button.

  2. You will get the result of request in Response Example as:

452
  1. Copy the “access_token” value from Response to use it for other APIs example.

Example: Try List of Properties API

Here we show an example how to use the token you obtained from Auth Login API. The following are steps:

  1. Select Properties → List of Properties API from left menu.

  2. Put copied access_token value in Authentication section for Bearer token under right menu.

458
  1. Now click on ‘Try It!’ button. Below is what it looks like in Reademe right panel:
445
  1. You will get the result of request in Response Example as shown below
448 1496