Skip to content

Commit 6ae3a9f

Browse files
authored
Merge pull request #135 from akeneo/API-216
API-216: support the content-type application/x-www-form-urlencoded when getting a token
2 parents 2cfdaf1 + bae0a7f commit 6ae3a9f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

content/rest-api/security.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ curl -X POST http://your-host/api/oauth/v1/token \
159159
}'
160160
```
161161

162+
:::info
163+
The content type `application/x-www-form-urlencoded` is also supported.
164+
:::
165+
162166
:::warning
163167
If you experience any error, please check the [troubleshooting guide](/documentation/troubleshooting.html#missing-client-id).
164168
:::

content/swagger/resources/token.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ post:
99
- 2.0
1010
x-no-token: true
1111
parameters:
12+
- name: Content-type
13+
in: header
14+
type: string
15+
description: Equal to 'application/json' or 'application/x-www-form-urlencoded', no other value allowed
16+
required: true
1217
- name: Authorization
1318
in: header
1419
type: string
1520
required: true
1621
description: Equal to 'Basic xx', where 'xx' is the base 64 encoding of the client id and secret. Find out how to generate them in the <a href="/documentation/security.html#create-an-oauth-client">Create an OAuth client</a> section.
1722
- name: body
1823
in: body
24+
x-form-data: true
1925
schema:
2026
type: object
2127
properties:

0 commit comments

Comments
 (0)