client.signInWithApiKeyAndSecret()

This method allows you to sign in using a key and secret.

Definition

client.signInWithApiKeyAndSecret(
key: string,
secret: string
):Promise<Session,Error>

Parameters

ParameterTypeDescription
keystringAn authentication key
secretstringAn authentication secret

Returns

An error will be thrown if any of the arguments are invalid.

Otherwise, once the returned Promise is resolved, we will have access to an object containing authentication and user information.

PropertyTypeDescription
authObjectAuthentication details
userObjectPartial User with some fields missing

Auth

PropertyTypeDescription
keystringAn authentication key
secretstringAn authentication secret
resourcestringThe generated resource token

Examples

const { user } = await client.signInWithApiKeyAndSecret(
'myKey',
'mySecret',
{
udid: '3bc656cc-025b-49d1-aacf-ddf1b22a3a4b'
}
);
console.log(user.displayName);