AuthService.svc web-service

Medium

// Request string.
POST Creatio_application_address/ServiceModel/AuthService.svc/Login

// Request headers.
Content-Type: application/json; charset=utf-8
ForceUseSession: true

// Request body.
{
    "UserName":"User name",
    "UserPassword":"User password"
}

// HTTP status code.
Status: code
// Response headers.

Set-Cookie: BPMLOADER=cookie_value; path=/Creatio_application_address; HttpOnly
Set-Cookie:  .ASPXAUTH=cookie_value; path=/Creatio_application_address; HttpOnly
Set-Cookie: BPMCSRF=cookie_value; path=/
Set-Cookie: UserName=cookie_value; expires=date_expire_to; path=/; HttpOnly

// Response body example.
{
     "Code": 0,
     "Message": "",
     "Exception": null,
     "PasswordChangeUrl": null,
     "RedirectUrl": null

}

Request string 

method required

Authentication service supports POST HTTP method.

Creatio_application_address required

Creatio application address.

ServiceModel/AuthService.svc/Login required

To perform authentication, call the Login AuthService.svc method.

Request headers 

Content-Type application/json required

Encoding and resource type passed in the request body.

ForceUseSession true required

The ForceUseSession header accounts for using the existing session.

Request body 

The request body must pass the Creatio user credentials. The credentials are passed as a JSON object.

UserName string required

The user name of a Creatio user.

UserPassword string required

The password of a Creatio user.

HTTP status code 

code

HTTP status code.

Status codes
200 OK The request has been completed sucessfully and the resource value is not equal to zero. In this case, the request body should contain the authentication status code. If it contains 0, the authentication is successful. In case of unsuccessful authentication, the authentication status code will equal 1 and the request body will contain a message about the cause of the unsuccessful authentication.
403 Forbidden The server cannot provide access to the resource specified in the request (for example, if a method name is spelled incorrectly). Request body can contain additional information.

Response headers 

The response to a POST request contains authentication cookies. You need to save these cookies on the side of the client or on the client computer to use them in your further Creatio web service queries.

Response body 

Code required

If the code contains a “0” value, the authentication is successful. Othewise, it is failed.

Message required

The message notifying of an unsuccessful authentication.

Exception required

The object that contains a detailed description of the exception connected with the unsuccessful authentication.