GET api/OAuth2

Presents the user with a login form which produces an OAuth 2.0 authorization code.

Request

Parameters

Name Description Default
client_id Client ID.
redirect_uri URI to redirect to after login.
state Optional value to be returned with the authorisation code.
response_type Must be 'code'. code
scope Not currently implemented. all

Response

Body

Content Type: text/html
Login page presented to the user.

Status Codes

Code Condition
200 OK The operation completed successfully.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.

Remarks

This is the first step in the OAuth 2.0 workflow. When the user completes the form, they are redirected to the URI specified in the request (with the parameters code and state appended).

redirect_uri must match the value recorded against the client ID. Client IDs are allocated/revoked from the System Settings view of the Management tab in ContactsLaw.

Once an authorization code has been obtained, it must be exchanged for an access token via POST OAuth2.

The use of HTTPS for both the API endpoint and redirect URI is strongly recommended.