Skip to main content
14 operations. See the auth & 2fa guide for worked examples.

changePassword

Mutation — returns LoginResult. Change the current user’s password to the password provided. Note that the means for making sure a user typed the password properly are out of the scope of this method and left up to the user interface calling this function. Parameters
NameGraphQL typeRequiredDescription
oldPasswordString!YesThe old password of the user.
newPasswordString!YesThe new password to use for the user’s account.
Example
result = client.changePassword(params={"oldPassword": ..., "newPassword": ...}, selections=Selection(...))

confirm2Fa

Mutation — returns LoginResult. User submitting the 2FA code in order to login. Parameters
NameGraphQL typeRequiredDescription
codeString!YesThe 2FA code that was sent to the user by email.
sessionIdString!YesThe id of the session to confirm 2FA for.
timestampIntNoThe timestamp of the confirmation.
emailEmailAddress!YesThe email of the user that the confirmation is being made for.
Example
result = client.confirm2Fa(params={"code": ..., "sessionId": ..., "timestamp": ..., "email": ...}, selections=Selection(...))

confirmChangePassword2Fa

Mutation — returns LoginResult. Confirm the 2FA code for the password change. Parameters
NameGraphQL typeRequiredDescription
codeString!YesThe 2fa code to confirm the changing of the old password to new password.
Example
result = client.confirmChangePassword2Fa(params={"code": ...}, selections=Selection(...))

confirmPasswordReset

Mutation — returns PasswordResetResult. Completes the forgotten password flow. Parameters
NameGraphQL typeRequiredDescription
passwordResetParamsPasswordResetParams!YesThe parameters for resetting the password.
Example
result = client.confirmPasswordReset(params={"passwordResetParams": ...}, selections=Selection(...))

disable2Fa

Mutation — returns TwoFactorAuthResult. Disable 2FA on the currently logged in user’s account. This mutation will do nothing if the user does not have 2FA already enabled. Parameters
NameGraphQL typeRequiredDescription
passwordStringNoUser’s password to disable 2FA
Example
result = client.disable2Fa(params={"password": ...}, selections=Selection(...))

enable2Fa

Mutation — returns TwoFactorAuthResult. Enable 2FA on the currently logged in user’s account. Parameters
NameGraphQL typeRequiredDescription
passwordStringNoUser’s password to enable 2FA
Example
result = client.enable2Fa(params={"password": ...}, selections=Selection(...))

forgotPassword

Mutation — returns ForgotPasswordResult. Invoked to initiate the forgotten password flow. Parameters
NameGraphQL typeRequiredDescription
emailEmailAddress!Yes
Example
result = client.forgotPassword(params={"email": ...}, selections=Selection(...))

login

Mutation — returns LoginResult. Login to the platform using the credentials. Please note that if the user has 2FA enabled the actual login will occur when the 2FA code is confirmed in another call to the API. Parameters
NameGraphQL typeRequiredDescription
credentialsLoginCredentials!YesThe credentials to use to log into the system.
Example
result = client.login(params={"credentials": ...}, selections=Selection(...))

logout

Mutation — returns LogoutResult. Logout of the platform on a specific device, invalidating all tokens. Parameters
NameGraphQL typeRequiredDescription
deviceInfoDeviceInfoNoThe information on the device to log out.
Example
result = client.logout(params={"deviceInfo": ...}, selections=Selection(...))

newToken

Mutation — returns LoginResult. Create a new authorization token from the user’s refresh token. Parameters
NameGraphQL typeRequiredDescription
refreshTokenString!Yes
Example
result = client.newToken(params={"refreshToken": ...}, selections=Selection(...))

register

Mutation — returns RegisterUserResult. New user registration based on JSON document Parameters
NameGraphQL typeRequiredDescription
inputUserRegistrationInputV2!Yes
Example
result = client.register(params={"input": ...}, selections=Selection(...))

resend2Fa

Mutation — returns TwoFactorAuthResult. Request that another 2FA code be sent when apparently the user didnt get the code. Parameters
NameGraphQL typeRequiredDescription
sessionIdString!YesThe session id to resend the code for.
emailEmailAddress!YesThe user id to resend the code for. The system will find the email for the user.
Example
result = client.resend2Fa(params={"sessionId": ..., "email": ...}, selections=Selection(...))

resendChangePassword2Fa

Mutation — returns TwoFactorAuthResult. Request that another 2FA code for password reset when the user didn’t receive or use the previous 2fa code. Example
result = client.resendChangePassword2Fa(selections=Selection(...))

send2Fa

Mutation — returns TwoFactorAuthResult. Request a new 2FA code providing the reason - i.e. updating user profile for example. The reasons are enums defined above. Example
result = client.send2Fa(selections=Selection(...))