For the base URL, authentication and errors, see the REST API overview.
POST /oauth/token
- Request: POST /oauth/token
- Operation: Authenticate
- Operation ID:
Authentication_AuthenticateToken - Authentication: none, public operation
Request body (application/x-www-form-urlencoded, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
grant_type | string | yes | One of: password, refresh_token | password to sign in with the credentials of the account, refresh_token to get a new access token. |
username | string | no | Username of the account. With grant_type=password. | |
password | string | no | Password of the account. With grant_type=password. | |
refresh_token | string | no | Refresh token of an earlier response. With grant_type=refresh_token. |
Example request: Sign in
bash
curl -X POST 'https://YOUR_SERVER/oauth/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=password&username=YOUR_USER&password=YOUR_PASSWORD'Responses
| Status | Description |
|---|---|
| 200 | ok |