Wiki source code of API Key

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

Show last authors
1 === Get WLINK API Key / Secret ===
2
3 Any Clients or Devices have to get API Key / Secret to use WLINK Cloud server.
4
5 **URL** :  ##/v1/getKey/:uuid##
6 **Method** : ##POST##
7 **Auth required** : ##NO##
8 **URL parameters**
9
10 (% class="box" %)
11 (((
12 * uuid : device(smart phone) uuid (**must be an unique value.** for example : MAC Address)
13 )))
14
15 ====== Data constraints ======
16
17 {{code language="json"}}
18 {
19 "service_code" : "[valid service code]",
20 "service_tag" : "[valid service tag]"
21 }
22 {{/code}}
23
24 ====== Data example ======
25
26 {{code language="json"}}
27 {
28 "service_code" : "WLINK_XXXXX",
29 "service_tag" : "ilovewinstars"
30 }
31 {{/code}}
32
33 ----
34
35 ===== Success Response =====
36
37 **Code** : ##200 OK##
38 **Content example**
39
40 {{code language="json"}}
41 {
42 "service_code": "WLINK_XXXXX",
43 "uuid": "uuid1",
44 "key": "WLINK_XXXXX56e9a5073bae54b7bb8e0b05",
45 "secret": "5e7815dc2bf02b173d327c42315220c136c92b03",
46 "expired_date":"20171231+0800"
47 }
48 {{/code}}
49
50 ----
51
52 ==== Error Response ====
53
54 **Condition** : Invalid Message Format or Service Code.
55 **Code** : ##400 BAD REQUEST##
56 **Content** :
57
58 {{code language="json"}}
59 {
60 }
61 {{/code}}
62
63 ===== Remark: =====
64
65 {{info}}
66 About service code and tag Please contact with System Administrator.
67 {{/info}}