POST /oauth/login

Allows a person to log in for the purposes of OAuth, and returns the OAuth authentication cookie. For users signed up on the platform; other users log in using the POST /oauth/login/ssoLogin operation.

Authorization Roles/Permissions: Anyone can run this operation.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The example below shows a login request.

Request URL


Sample request headers

Content-Type: application/x-www-form-urlencoded
Accept: application/json

Sample request body #1: OAuth Admin login

In the example below, the user is the OAuth Administrator. The Domain parameter is included.


Sample request body #2: Site user

The site user logs in with the username.


Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json
Content-Type application/x-www-form-urlencoded

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
Domain Path string See notes

Domain name parameter:

  • If logging in as a site user, this parameter is not valid.
  • If logging in as the OAuth Administrator, this parameter is required.

Back to top


If successful, this operation returns HTTP status code 200, with:

  • A cookie that will be used for subsequent requests. For non-browser scenarios, the application must save this cookie and include it in every request. The cookie name includes the OAuth Provider name. Cookie name: OAuthToken_{OAuthProviderName}.
  • The UserName and DomainName of the user. Example: { "DomainName" : "Local Domain", "UserName" : "Rep1" }.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/json
Set-Cookie: OAuthToken_acmepaymentscorpoauthdomain=TokenID%3D13439132-4b50-11e5-ad9b-a53b582c6f09%2Cclaimed_id%3D

Sample response body

The example below is the response after redirects are done.

"DomainName": "Local Domain",
"UserName": "adminAcmepaymentscorp"

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json
Set-Cookie OAuthToken_{OAuthProviderName}

Back to top

Response Body

Name Type Description
LoginResponse LoginResponse Contains information about the response to an OAuth login request.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
500 An error occurred processing the call.

More information about Akana OAuth API error messages.

Back to top

Related Topics