verifyTwoFactor
Public: no authentication required.
Finishes a sign-in that needs a second factor, using the temporary token from the sign-in and a verification code. Returns tokens and a session token.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation VerifyTwoFactor($input: VerifyTwoFactorInput!) {
verifyTwoFactor(input: $input) {
accessToken
expiresIn
mustChangePassword
organizationId
partnerId
refreshToken
organization {
id
code
postalCode
registrationNumber
name
status
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation VerifyTwoFactor($input: VerifyTwoFactorInput!) {\n verifyTwoFactor(input: $input) {\n accessToken\n expiresIn\n mustChangePassword\n organizationId\n partnerId\n refreshToken\n organization {\n id\n code\n postalCode\n registrationNumber\n name\n status\n }\n }\n}",
"variables": {
"input": {
"tempToken": "string",
"token": "string",
"userId": "string"
}
}
}
EOF
Variables:
{
"input": {
"tempToken": "string",
"token": "string",
"userId": "string"
}
}
Response:
{
"data": {
"verifyTwoFactor": {
"accessToken": "string",
"expiresIn": 0,
"mustChangePassword": true,
"organizationId": "string",
"partnerId": "string",
"refreshToken": "string",
"organization": {
"id": "string",
"code": "string",
"postalCode": "string",
"registrationNumber": "string",
"name": "string",
"status": "string"
}
}
}
}
verifyTwoFactor(
input: VerifyTwoFactorInput!
): AuthResponse!
Arguments
verifyTwoFactor.input ● VerifyTwoFactorInput! non-null input
The user ID, the verification code and the temporary token from the sign-in.
Type
AuthResponse object
The result of a sign in.