Skip to main content

Verification Operations

This section covers GraphQL operations related to email, phone, and Multi-Factor Authentication (MFA) verification.

Email and Phone Verification​

Request User Lookup​

Initiates a verification process for email or phone number.

mutation RequestUserLookup($input: RequestUserLookupInput!) {
requestUserLookup(input: $input) {
maskedValue
cooldown
expireTime
}
}

Input Parameters for Email Verification:

{
"input": {
"email": "user@example.com",
"type": "EMAIL"
}
}

Input Parameters for Phone Verification:

{
"input": {
"phoneNumber": "1234567890",
"phoneCode": "+1",
"type": "PHONE"
}
}

Response:

{
"data": {
"requestUserLookup": {
"maskedValue": "u***@e*****.com",
"cooldown": 60,
"expireTime": "2023-01-01T00:05:00Z"
}
}
}

Verify User Lookup​

Verifies a code sent during the verification process.

mutation VerifyUserLookup($input: VerifyUserLookupInput!) {
verifyUserLookup(input: $input) {
status
message
}
}

Input Parameters:

{
"input": {
"code": "123456",
"type": "EMAIL"
}
}

Response:

{
"data": {
"verifyUserLookup": {
"status": "SUCCESS",
"message": "Email verified successfully"
}
}
}

Multi-Factor Authentication​

Check 2FA Verification​

Checks if 2FA verification is enabled for the current user.

query Is2faVerify {
is2faVerify
}

Response:

{
"data": {
"is2faVerify": true
}
}

Input Types​

RequestUserLookupInput​

FieldTypeDescriptionRequired for
emailStringEmail address to verifyEMAIL type
phoneNumberStringPhone number to verifyPHONE type
phoneCodeStringCountry code for the phone numberPHONE type
typeLookupRequestTypeType of verification (EMAIL, PHONE)Optional (recommended)

VerifyUserLookupInput​

FieldTypeDescriptionRequired
codeStringVerification code received by the userYes
typeLookupRequestTypeType of verification to completeOptional

Lookup Request Types​

The LookupRequestType enum contains the following values:

  • EMAIL: Email verification
  • PHONE: Phone verification

Additionally, internal lookup types used by the system include:

  • SETUP_MFA_WITH_AUTHENTICATOR: Setup MFA with authenticator app
  • EDIT_MFA_WITH_AUTHENTICATOR: Edit MFA settings for authenticator app
  • SETUP_MFA_WITH_PHONE: Setup MFA with phone
  • EDIT_MFA_WITH_PHONE: Edit MFA settings for phone