getLoginCapabilities

TrueConfAbout 10 min

getLoginCapabilities

Description: obtain detailed information about the authentication capabilities on the server. v4.3.3+

The command returns properties that indicate additional capabilities and limitations related to server authorization 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.4.0"
}

Parameter description:

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

  • authenticationMethod - the required type of authentication. This field is optional. Possible values include:

    • 0 - authorization using login and password with the MD5 hash of the password 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 username and password

  • emailLogin - a field indicating allowable email authentication. The field may be absent. Possible values:

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

Example of authentication using third-party providers:

We assume that TrueConf Room API is already connected to the server and has an authorized connection established using auth to send commands and receive responses and notifications.

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

  2. In the response, we receive a set of information about 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": []
}

Parameter description:

  • networks - list of available providers

  • id - unique provider identifier

  • name - provider name

  • pictures - icon sizes with the provider's logo

  • login - this is a deprecated field that should not be used

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

  • login3 - authorization link for Android

  1. Open the web page using the link specified in the login* field, and proceed with authorization.

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

In the case of successful authorization, the form contains the following hidden fields:

<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 login and password obtained from the form response (name='login' and name='password'), and set the encryptPassword parameter to false.

See also: