Skip to main content

loginWithOtp

Public: no authentication required.

Signs in with the code from requestLoginOtp. A code works once and expires after 5 minutes. Returns tokens and a session token and sets sign-in cookies for web clients. Rate-limited per IP address. No sign-in needed.

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:

mutation LoginWithOtp($loginWithOtpInput: LoginWithOtpInput!) {
loginWithOtp(loginWithOtpInput: $loginWithOtpInput) {
accessToken
expiresIn
mustChangePassword
organizationId
partnerId
refreshToken
organization {
id
code
postalCode
registrationNumber
name
status
}
}
}

Variables:

{
"loginWithOtpInput": {
"email": "string",
"otp": "string"
}
}

Response:

{
"data": {
"loginWithOtp": {
"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"
}
}
}
}
loginWithOtp(
loginWithOtpInput: LoginWithOtpInput!
): AuthResponse!

Arguments​

loginWithOtp.loginWithOtpInput ● LoginWithOtpInput! non-null input​

The email address, the code, the organization subdomain and optional device-trust settings.

Type​

AuthResponse object​

The result of a sign in.