Main endpoint to obtain OAuth2 tokens.
POST/oauth2/token
The OAuth2 token endpoint supports the following grant types:
- client_credentials: this issues a client access_token which can be used by any Teneo component without the specification of any user.
E.g.
grant_type=client_credentials&client_id=123e4567-e89b-12d3-a456-426614174000&client_secret=123e4567-e89b-12d3-a456-426614174000 - password: this issues a user access_token; the issued token has the user and the client as its context. This is commonly used by the Teneo components when a user logs in.
E.g.
grant_type=password&client_id=123e4567-e89b-12d3-a456-426614174000&client_secret=123e4567-e89b-12d3-a456-426614174000&username=user1&password=pass1 - refresh_token: this issues a new access_token using a refresh_token. Access tokens expire at a certain point, so Teneo components use this type to obtain a new access_token without the need to ask for the user credentials again.
E.g.
grant_type=refresh_token&client_id=123e4567-e89b-12d3-a456-426614174000&client_secret=123e4567-e89b-12d3-a456-426614174000&refresh_token=123e4567-e89b-42d3-a456-556642440000
E.g. grant_type=client_credentials&client_id=admin&client_secret=admin_pass
Request
Responses
- 200
- 400
- 401
- 500
- 503
Generates a valid oauth2 token and returns it in the response.
Returned in case of any missing or invalid parameter.
Returned in case of request is unauthorized.
Returned in case of unexpected error.
Returned in case of service unavailability.