|
16 | 16 | - name: channel-access-token |
17 | 17 |
|
18 | 18 | paths: |
| 19 | + "/oauth2/v3/token": |
| 20 | + post: |
| 21 | + externalDocs: |
| 22 | + url: https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token |
| 23 | + tags: |
| 24 | + - channel-access-token |
| 25 | + operationId: issueStatelessChannelToken |
| 26 | + description: | |
| 27 | + Issues a new stateless channel access token, which doesn't have max active token limit |
| 28 | + unlike the other token types. |
| 29 | + The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. |
| 30 | + requestBody: |
| 31 | + required: true |
| 32 | + content: |
| 33 | + application/x-www-form-urlencoded: |
| 34 | + schema: |
| 35 | + oneOf: |
| 36 | + - $ref: '#/components/schemas/IssueStatelessChannelTokenByJWTAssertionRequest' |
| 37 | + - $ref: '#/components/schemas/IssueStatelessChannelTokenByClientSecretRequest' |
| 38 | + responses: |
| 39 | + "200": |
| 40 | + description: "OK" |
| 41 | + content: |
| 42 | + application/json: |
| 43 | + schema: |
| 44 | + "$ref": "#/components/schemas/IssueStatelessChannelAccessTokenResponse" |
| 45 | + example: |
| 46 | + token_type: Bearer |
| 47 | + access_token: eyJhbGciOiJIUz..... |
| 48 | + expires_in: 899 |
| 49 | + |
19 | 50 | "/oauth2/v2.1/tokens/kid": |
20 | 51 | get: |
21 | 52 | externalDocs: |
@@ -256,6 +287,71 @@ components: |
256 | 287 | description: "Channel access token" |
257 | 288 |
|
258 | 289 | schemas: |
| 290 | + IssueStatelessChannelTokenByJWTAssertionRequest: |
| 291 | + externalDocs: |
| 292 | + url: https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token |
| 293 | + description: "Request body to issue a new token with JWT assertion" |
| 294 | + type: object |
| 295 | + required: |
| 296 | + - grant_type |
| 297 | + - client_assertion |
| 298 | + - client_assertion_type |
| 299 | + properties: |
| 300 | + grant_type: |
| 301 | + type: string |
| 302 | + enum: [ client_credentials ] |
| 303 | + description: "client_credentials" |
| 304 | + client_assertion_type: |
| 305 | + type: string |
| 306 | + enum: [ urn:ietf:params:oauth:client-assertion-type:jwt-bearer ] |
| 307 | + description: "URL-encoded value of `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`" |
| 308 | + client_assertion: |
| 309 | + type: string |
| 310 | + description: "A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key." |
| 311 | + IssueStatelessChannelTokenByClientSecretRequest: |
| 312 | + externalDocs: |
| 313 | + url: https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token |
| 314 | + description: "Request body to issue a new token with `client_id` and `client_secret`" |
| 315 | + type: object |
| 316 | + required: |
| 317 | + - grant_type |
| 318 | + - client_id |
| 319 | + - client_secret |
| 320 | + properties: |
| 321 | + grant_type: |
| 322 | + type: string |
| 323 | + enum: [ client_credentials ] |
| 324 | + description: "`client_credentials`" |
| 325 | + client_id: |
| 326 | + type: string |
| 327 | + description: "Channel ID." |
| 328 | + client_secret: |
| 329 | + type: string |
| 330 | + description: "Channel secret." |
| 331 | + IssueStatelessChannelAccessTokenResponse: |
| 332 | + externalDocs: |
| 333 | + url: https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token |
| 334 | + description: "Issued stateless channel access token" |
| 335 | + required: |
| 336 | + - access_token |
| 337 | + - expires_in |
| 338 | + - token_type |
| 339 | + type: object |
| 340 | + properties: |
| 341 | + access_token: |
| 342 | + type: string |
| 343 | + description: |+ |
| 344 | + A stateless channel access token. |
| 345 | + The token is an opaque string which means its format is an implementation detail |
| 346 | + and the consumer of this token should never try to use the data parsed from the token. |
| 347 | + expires_in: |
| 348 | + type: integer |
| 349 | + format: int32 |
| 350 | + description: "Duration in seconds after which the issued access token expires" |
| 351 | + token_type: |
| 352 | + type: string |
| 353 | + default: Bearer |
| 354 | + description: "Token type. The value is always `Bearer`." |
259 | 355 | ChannelAccessTokenKeyIdsResponse: |
260 | 356 | externalDocs: |
261 | 357 | url: https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1 |
@@ -291,7 +387,7 @@ components: |
291 | 387 | token_type: |
292 | 388 | type: string |
293 | 389 | default: Bearer |
294 | | - description: "A token type. `Bearer`" |
| 390 | + description: "Token type. The value is always `Bearer`." |
295 | 391 | IssueChannelAccessTokenResponse: |
296 | 392 | externalDocs: |
297 | 393 | url: https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1 |
@@ -346,4 +442,3 @@ components: |
346 | 442 | error_description: |
347 | 443 | description: "Details of the error. Not returned in certain situations." |
348 | 444 | type: string |
349 | | - |
|
0 commit comments