Home > @shopware-pwa/shopware-6-client > login

# login() function

Login user to shopware instance.

Signature:

export declare function login({ username, password }?: {
    username?: string;
    password?: string;
}, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

# Parameters

Parameter Type Description
{ username, password } { username?: string; password?: string; }
contextInstance ShopwareApiInstance

Returns:

Promise<ContextTokenResponse>

# Exceptions

ClientApiError