Session Key

Last modified by Alex Chang on 2022/04/07 09:17

Get WLINK Session Key

To use WLINK Service have to get session Key

URL/v1/session/:apikey
Method : POST
Auth required : NO
URL parameters

  • apikey : API Key value from /api/getKey
Data constraints
{
   "uuid": "[valid device uuid]",
   "time": "[YYYYMMDDHHmmss+ZZZZ]",
   "service_code" : "[valid service code]",
   "service_tag" : "[valid service tag]",
   "auth": "[valid auth value]"
}
  • auth : hmac_md5(time+service_code+service_tag+uuid+key, secret). Hex String Format
Data example
{
   "uuid": "uuid1",
   "time": "20161126095000+0800",
   "service_code" : "WLINK_XXXXX",
   "service_tag" : "ilovewinstars",
   "auth": "7a0ad58efc8dfdec4bb2a353b3746a41"
}

Success Response

Code : 200 OK
Content example

{
   "service_code": "WLINK_XXXXX",
   "uuid": "uuid1",
   "key": "WLINK_XXXXX56e9a5073bae54b7bb8e0b05",
   "session_key": "db75e2819e615584591461252bca504a",
   "session_time": "20161126123042+0800"
}

Error Response

Condition : Invalid Message Format or Service Code.
Code : 400 BAD REQUEST
Content :

{
}
Remark:

The session key is valid before the session time. You can call this URL again to update it. if you call this URL for the last 30 mins, the session key is not changed. The system will return the same session key  value.