# getLoginCapabilities

Version: 4.3.3+

Description: obtain detailed information about the authorization capabilities on the server.

The command returns properties that indicate additional capabilities and restrictions related to server authentication using the login method.

Example:

{
    "method": "getLoginCapabilities",
    "requestId" : "1"
}

Answer examples:

{
    "method" : "getLoginCapabilities",
    "requestId" : "1",
    "result" : true,
    "socialManifest": "https://some.server:743/manifest&lang=ru&os=windows&version=4.3.3"
}

Parameter description:

  • socialManifest - a link for authentication through third-party providers. This field may be optional.

  • authenticationMethod - the required type of authentication. This field may be omitted. Possible values include:

    • 0 - authorization using login and password with password md5 sent to the server

    • 1 - authorization using a login and password with the password sent to the server in plain text

    • 2 - authorization via an external provider without a login and password

  • emailLogin - a field indicating allowable email-based authorization. This field may be optional. Possible values:

    • 1 - authorization by email with implicit registration and session waiting is allowed
  • requestId - a unique request identifier. You can learn more about it here.

Example of authentication using third-party providers:

We assume that TrueConf Room is already connected to the server and there is an authorized connection established using auth to enable sending commands and receiving responses and notifications.

  1. Sending request
{
    "method": "getLoginCapabilities"
}
  1. Receiving a response
{
    "method" : "getLoginCapabilities",
    "result" : true,
    "socialManifest": "https://some.server:743/manifest&lang=ru&os=windows&version=4.3.3"
}
  1. We make a GET request to the link specified in the socialManifest field value.

  2. In the response, you receive a set of information regarding available authorization providers: names, links for this purpose, a set of icons, and more. An example of such a response:

{
    "networks": [
        {
            "id": "vk",
            "name": "\u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=vk&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=vk&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=vk&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=vk&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/vkontakte.svg"
            }
        },
        {
            "id": "gl",
            "name": "Google",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=gl&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=gl&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=gl&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=gl&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/google.svg"
            }
        },
        {
            "id": "ml",
            "name": "Mail.ru",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=ml&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=ml&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=ml&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=ml&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/mailru.svg"
            }
        },
        {
            "id": "ya",
            "name": "\u042f\u043d\u0434\u0435\u043a\u0441",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=ya&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=ya&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=ya&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=ya&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/yandex.svg"
            }
        },
        {
            "id": "ok",
            "name": "\u041e\u0434\u043d\u043e\u043a\u043b\u0430\u0441\u0441\u043d\u0438\u043a\u0438",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=ok&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=ok&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=ok&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=ok&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/odnoklassniki.svg"
            }
        },
        {
            "id": "ms",
            "name": "Microsoft",
            "features": {
                "login": "https:\/\/some.server:743\/social-login?utm_source=application&full_version=1&name=ms&version=8.4.0&lang=ru",
                "login2": "https:\/\/some.server:743\/social-login?utm_source=application&version=2&full_version=1&name=ms&version=8.4.0&lang=ru",
                "login3": "https:\/\/some.server:743\/social-login?&name=ms&version=8.4.0&lang=ru",
                "import": "https:\/\/some.server:743\/widget\/login\/import?name=ms&version=8.4.0&lang=ru"
            },
            "pictures": {
                "24": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "36": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "48": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "64": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "72": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "96": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "128": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg",
                "144": "https:\/\/some.server:743\/public\/images\/social\/icons\/qt\/8.0\/windows.svg"
            }
        }
    ],
    "invitations": []
}

Description of Parameters

  • networks - list of available providers

  • id — the unique identifier of a provider

  • name — provider name.

  • pictures - sizes of provider logo icons

  • login - an outdated field that should not be used

  • login2 - the link for authorization on Windows, macOS, Linux, iOS

  • login3 - link for authorization on Android

  • Open the web page from the link specified in the login* field and proceed with authorization on it.

  • The result of web authorization is the presence of the <form name='vsreg'></form> form in the response body.

Each device in the list contains the following parameters:

<input type='hidden' name='login' value='{{call_id}}' />
<input type='hidden' name='password' value='{{session}}' />
<input type='hidden' name='state' value='successful' />
<input type='hidden' name='status' value='{{status}}' />  /* This field is optional and contains additional information about authorization. It can take values such as first_login and registration */

In case of unsuccessful authorization, the form contains the following hidden fields (Only for login2):

<input type='hidden' name='state' value='error' />
<input type='hidden' name='error_code' value='{{error.code}}' /> /* Error code */
<input type='hidden' name='error_desc' value='{{error.desc}}' /> /* Error description */
<input type='hidden' name='timestamp' value='{{error.timestamp}}' /> /* Adjusted time for retrying the request */
  1. Execute the login method using the username and password from the form response (name='login' and name='password'), and set the encryptPassword parameter to false.

See also: