Skip to main content
All authorized endpoints require Authorization: Bearer <ACCESS_TOKEN> header in request!
Otherwise API client will receive an error message with status 401 - Unauthorized
Example Header:
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VyaWRcIjoyMDY0MSxcInNjcmVlbk5hbWVcIjpcImJpZW5wb3J0LmZsZXh5d2F0dFwiLFwicmVtZW1iZXJNZVwiOnRydWV9IiwiaWF0IjoxNzU2MTQwODE3LCJleHAiOjE3NjM5MTY4MTd9.Vg9gAG1dn8v8c8f0J6H08NW2Bomwsyqk8LfDnc7WZFlX2zZrhZMoC-ru3oZL0wg0TuYaqTJ2cr9Hky4ddsGR9A

1. Login Operation

Login Operations are Made With ScreenName And Password
API Endpoint: /auth/login
Example Request Payload:
{
  "screenName": "905554447788",
  "password": "password",
  "rememberMe": true
}
Example Success Response:
{
    "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VyaWRcIjoyMDY0MSxcInNjcmVlbk5hbWVcIjpcImJpZW5wb3J0LmZsZXh5d2F0dFwiLFwicmVtZW1iZXJNZVwiOnRydWV9IiwiaWF0IjoxNzU2MTQwODE3LCJleHAiOjE3NjM5MTY4MTd9.Vg9gAG1dn8v8c8f0J6H08NW2Bomwsyqk8LfDnc7WZFlX2zZrhZMoC-ru3oZL0wg0TuYaqTJ2cr9Hky4ddsGR9A",
    "mqUser": "mqttuser",
    "mqPassword": "XFAYdhtDquax/rtofHjqCw==",
    "userId": 20641,
    "emailAddress": "demo@bienport.com",
    "screenName": "bienport.demo",
    "localeId": "tr_TR",
    "roles": [
        {
            "roleId": 20166,
            "roleName": "User",
            "type": 1,
            "inherited": false,
            "typePK": 1
        }
    ],
    "organizations": [
        {
            "name": "Bimetri",
            "id": 20635
        }
    ],
    "organizationIds": [
        20635
    ],
    "resources": [
        {
            "resourceId": 17305,
            "networkId": "26:AA:E0:23:23:5E",
            "resourceName": "Bimetri Demo Konsantratör",
            "enabled": false,
            "treePath": "/17305/",
            "orgId": 20635,
            "resourceType": "Gateway",
            "deviceSubType": "gateway"
        },
        {
            "resourceId": 17354,
            "networkId": "26:AA:09:0B:6D:FB",
            "resourceName": "Bimetri Demo Pano",
            "enabled": true,
            "treePath": "/17354/",
            "orgId": 20635,
            "resourceType": "Gateway",
            "deviceSubType": "gateway"
        }
    ]
}
Access Tokens are valid for only 3 hour when “Remember Me” is selected as ‘false’. Ther are valid for 3 months when “Remember Me” is selected as ‘true’.
Possible Error Responses:
{
    "statusCode": 401,
    "error": "AuthorizationException",
    "message": "Incorrect username or password. Username: bienport.demo",
    "path": "/auth/login"
}