-
Notifications
You must be signed in to change notification settings - Fork 30
/
liff.yml
347 lines (330 loc) · 10.3 KB
/
liff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
openapi: "3.0.2"
info:
title: LIFF server API
version: "1.0.0"
description: "LIFF Server API."
servers:
- url: https://api.line.me/
security:
- Bearer: []
tags:
- name: liff
paths:
"/liff/v1/apps":
post:
operationId: addLIFFApp
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#add-liff-app
summary: "Create LIFF app"
tags:
- liff
description: "Adding the LIFF app to a channel"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/AddLiffAppRequest"
required: true
responses:
"200":
description: "OK"
content:
"application/json":
schema:
$ref: "#/components/schemas/AddLiffAppResponse"
example:
liffId: "{liffId}"
"400":
description: |+
This status code means one of the following:
- The request contains an invalid value.
- The maximum number of LIFF apps that can be added to the channel has been reached.
"401":
description: |+
Authentication failed.
get:
operationId: getAllLIFFApps
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#get-all-liff-apps
summary: "Get all LIFF apps"
description: "Gets information on all the LIFF apps added to the channel."
tags:
- liff
responses:
"200":
description: "OK"
content:
"application/json":
schema:
$ref: "#/components/schemas/GetAllLiffAppsResponse"
example:
apps:
- liffId: "{liffId}"
view:
type: full
url: https://example.com/myservice
description: "Happy New York"
permanentLinkPattern: concat
- liffId: "{liffId}"
view:
type: tall
url: https://example.com/myservice2
features:
ble: true
qrCode: true
permanentLinkPattern: concat
scope:
- profile
- chat_message.write
botPrompt: none
"401":
description: |+
Authentication failed.
"404":
description: |+
There is no LIFF app on the channel.
"/liff/v1/apps/{liffId}":
parameters:
- name: liffId
in: path
required: true
description: "ID of the LIFF app to be updated"
schema:
type: string
put:
operationId: updateLIFFApp
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#update-liff-app
summary: "Update LIFF app from a channel"
description: "Update LIFF app settings"
tags:
- liff
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/UpdateLiffAppRequest"
required: true
responses:
"200":
description: "OK"
"400":
description: |+
The request contains an invalid value.
"401":
description: |+
Authentication failed.
"404":
description: |+
This status code means one of the following:
- The specified LIFF app does not exist.
- The specified LIFF app has been added to another channel.
delete:
operationId: deleteLIFFApp
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#delete-liff-app
summary: "Delete LIFF app from a channel"
description: |+
Deletes a LIFF app from a channel.
tags:
- liff
responses:
"200":
description: "OK"
"401":
description: |+
Authentication failed.
"404":
description: |+
This status code means one of the following:
- The specified LIFF app does not exist.
- The specified LIFF app has been added to another channel.
components:
securitySchemes:
Bearer:
type: http
scheme: bearer
description: "Channel access token"
schemas:
AddLiffAppRequest:
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#add-liff-app
type: object
required:
- view
properties:
view:
$ref: "#/components/schemas/LiffView"
description:
type: string
description: |+
Name of the LIFF app.
The LIFF app name can't include "LINE" or similar strings, or inappropriate strings.
features:
$ref: "#/components/schemas/LiffFeatures"
permanentLinkPattern:
type: string
description: |+
How additional information in LIFF URLs is handled. Specify `concat`.
scope:
type: array
items:
$ref: "#/components/schemas/LiffScope"
botPrompt:
$ref: "#/components/schemas/LiffBotPrompt"
LiffBotPrompt:
type: string
description: |+
Specify the setting for bot link feature with one of the following values:
`normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen.
`aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen.
`none`: Don't display the option to add the LINE Official Account as a friend.
The default value is none.
enum:
- normal
- aggressive
- none
LiffView:
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#add-liff-app
type: object
required:
- type
- url
properties:
type:
description: |+
Size of the LIFF app view. Specify one of these values:
- compact
- tall
- full
type: string
enum:
- compact
- tall
- full
url:
type: string
format: uri
description: |+
Endpoint URL. This is the URL of the web app that implements the LIFF app
(e.g. https://example.com).
Used when the LIFF app is launched using the LIFF URL.
The URL scheme must be https. URL fragments (#URL-fragment) can't be specified.
moduleMode:
type: boolean
description: |+
`true` to use the LIFF app in modular mode.
When in modular mode, the action button in the header is not displayed.
UpdateLiffView:
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#update-liff-app
type: object
properties:
type:
description: |+
Size of the LIFF app view. Specify one of these values:
- compact
- tall
- full
type: string
enum:
- compact
- tall
- full
url:
type: string
format: uri
description: |+
Endpoint URL. This is the URL of the web app that implements the LIFF app
(e.g. https://example.com).
Used when the LIFF app is launched using the LIFF URL.
The URL scheme must be https. URL fragments (#URL-fragment) can't be specified.
moduleMode:
type: boolean
description: |+
`true` to use the LIFF app in modular mode.
When in modular mode, the action button in the header is not displayed.
LiffFeatures:
type: object
properties:
ble:
type: boolean
description: |+
`true` if the LIFF app supports Bluetooth® Low Energy for LINE Things. `false` otherwise.
qrCode:
type: boolean
description: |+
`true` to use the 2D code reader in the LIFF app. false otherwise. The default value is `false`.
default: false
AddLiffAppResponse:
type: object
required:
- liffId
properties:
liffId:
type: string
UpdateLiffAppRequest:
externalDocs:
url: https://developers.line.biz/en/reference/liff-server/#add-liff-app
type: object
properties:
view:
$ref: "#/components/schemas/UpdateLiffView"
description:
type: string
description: |+
Name of the LIFF app.
The LIFF app name can't include "LINE" or similar strings, or inappropriate strings.
features:
$ref: "#/components/schemas/LiffFeatures"
permanentLinkPattern:
type: string
description: |+
How additional information in LIFF URLs is handled. Specify `concat`.
scope:
type: array
items:
$ref: "#/components/schemas/LiffScope"
botPrompt:
$ref: "#/components/schemas/LiffBotPrompt"
LiffScope:
type: string
enum:
- openid
- email
- profile
- chat_message.write
description: |+
Array of scopes required for some LIFF SDK methods to function.
The default value is `["profile", "chat_message.write"]`.
GetAllLiffAppsResponse:
type: object
properties:
apps:
type: array
items:
$ref: "#/components/schemas/LiffApp"
LiffApp:
type: object
properties:
liffId:
type: string
description: "LIFF app ID"
view:
$ref: "#/components/schemas/LiffView"
description:
type: string
description: "Name of the LIFF app"
features:
$ref: "#/components/schemas/LiffFeatures"
permanentLinkPattern:
type: string
description: |+
How additional information in LIFF URLs is handled. concat is returned.
scope:
type: array
items:
$ref: "#/components/schemas/LiffScope"
botPrompt:
$ref: "#/components/schemas/LiffBotPrompt"