Skip to main content
Skip table of contents

Login


Before using the functions on this page, you may find it useful to review the following information:

The list of all functions is here.

Description of this function

Ability to log in with an account (email address and password)

In the code sample below the /Service/Login endpoint is called with email and password. The result returned has Success which is true or false. If false then the reason is returned in Message.

The other parameter returned is Uuid which is the unique id for this session. It is not required for any additional API calls because it is stored in the session cookie.

The login creates a session. The session will remain active as long as any API calls are made within a 20 min period.

OnLogin() function

A sample output from calling the above is:

JS
function OnLogin() {
    var email = $('#email').val();
    var password = $('#password').val();
    $("#loginmessage").html("...");
    $("#sessionguid").html("");
    $.ajax({
        url: '/Service/Login',
        type: 'POST',
        contentType: 'application/json',
        data: JSON.stringify({ email: email, password : password }),
        dataType: 'json',
        success: function (result) {
            if (!result.Success) {
                $("#loginmessage").html(result.Message);
            }
            else {
                $("#resultjson").html("");
				_uuid = result.Uuid;
                $("#loginmessage").html("Success");
                $("#sessionguid").val(result.Uuid);
            }
        }
    });
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.