Bug 29620: Move the OpenAPI spec to YAML format
[koha.git] / api / v1 / swagger / paths / oauth.yaml
1 ---
2 /oauth/token:
3   post:
4     x-mojo-to: OAuth#token
5     operationId: tokenOAuth
6     tags:
7       - oauth
8     summary: Get access token
9     produces:
10       - application/json
11     parameters:
12       - name: grant_type
13         in: formData
14         description: grant type (client_credentials)
15         required: true
16         type: string
17       - name: client_id
18         in: formData
19         description: client id
20         type: string
21       - name: client_secret
22         in: formData
23         description: client secret
24         type: string
25     responses:
26       "200":
27         description: OK
28         schema:
29           type: object
30           properties:
31             access_token:
32               type: string
33             token_type:
34               type: string
35             expires_in:
36               type: integer
37           additionalProperties: false
38       "400":
39         description: Bad Request
40         schema:
41           $ref: ../definitions.yaml#/error
42       "403":
43         description: Access forbidden
44         schema:
45           $ref: ../definitions.yaml#/error