Users > Users > usersTwoFactor
Commerce APIUsersUsersusersTwoFactor
usersTwoFactor
POST:users/two_factor.json

Description

Generates 2FA code for user and puts it into pending state. If phone is not empty, the phone path is used, otherwise the app path is used.

Use usersTwoFactorValidate mutation to enable it.

Topic: Users

Arguments

data: TwoFactorConfig!

Main argument for mutations.


Data Argument Fields

call: Boolean

Call the phone with a voice message instead of using SMS messages

Example: true


country: String

Country code if using local phone number

Example: "US"


phone: String

Use this phone number for two factor auth

Example: "+61123123123"


Result

TwoFactor

Preview (typescript)

Loading module