iotoms Docs

Sign in with username and password

POST
/api/v1/auth/authenticate

Verifies a username and password and returns an access token. Send it as a Bearer token in the Authorization header, with your merchant identifier in X-TenantID, on later requests.

How to use it

  1. Send username and password, with your merchant identifier in the X-TenantID header; the user is looked up within that merchant.
  2. Use the returned token as a Bearer token in the Authorization header, with the same X-TenantID, on later calls.

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
username*string

The user's sign-in name.

password*string

The user's password.

Response Body

OK

*/*
  1. response
token*string

Access token for the merchant you signed in to, valid for one year. Send it as a Bearer token in the Authorization header of later requests.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/auth/authenticate' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{  "username": "string",  "password": "string"}'
Example Response
{  "token": "string"}