From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


login

Allows users to log into the Agent Desktop application

Request

Syntax

login(loginData: LoginData, force?: boolean): Promise<OperationResult<null>>

Where:

type LoginData = {

    username: string

    password: string

    tenant?: string

}


Parameters

Parameters Parameter Values Data Type Optional/Required Description
LoginData
username String Required The user’s Agent Desktop username
password String Required The user’s Agent Desktop password
tenant String Optional The domain of your tenant (i.e., contact center)
force true

false

String Optional Set the value to true if you want to force login.


Example Request

    loginButton.onclick = () => {
        const username = usernameInput.value
        const password = passwordInput.value
        const tenant = tenantInput.value
        adApi.login({username: username, password: password, tenant: tenant})
    }

Return Value

null

< Previous | Next >