2 User Authorization

Login to your developer portal account by using the generated IotMife Access-Token

Method

POST

API

https://iotdev.dialog.lk/axt-iot-mbil-instance0001001/apkios/axtitomblebckenddev/proxy/authenticate

Headers

IotMife-AccessToken : Generated At https://docs.iot.ideamart.io/IoT_API's/2_User_Authorization
Accept              : application/json
Content-Type        : application/json

Body

{
    "user_name": "xxx",
    "password": "yyy"
}

Response

{
    "auth": true,
    "token":
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2lvdGRldi5kaWFsb2cubGsiLCJleHAiOjE1MzjhsdihvsdifhsdifsdifojoiaHR0cHM6Ly9pb3RkZXYuZGlhbG9nLmxrIiwianRpIjoiSW90Kjc2NTY2RGlhbG9nIiwibmJmIjoxMzU3MDAwMDAwLCJ0eXAiOiJodHRwczovL2lvdGRldi5kaWFsb2cubGsvYXV0aGVudGljYXRlIiwidXNlcl9pZCI6MTB9.dK8ihjdm6KQ9-f784bByFcoFaidCjK1cAsXt-xwwMZY",
    "data": {
        "user_id": yyy,
        "email": "abc@gmail.com",
        "mobilenum": "777387629",
        "shipping_addr": "",
        "user_name": "deal",
        "theme": null,
        "password": "3F1B7Y4M"
    }
}

Then you will get a token, use it as X-Key to call the APIs that the developer has subscribed. Please note that your user_id=yyy.

When using the developer APIs Please use the following Headers.

IotMife-AccessToken : Generated At the step 2/3
X-Key               : Generated At the step 4
Accept              : application/json
Content-Type        : application/json
Last updated on 9th Mar 2018