verifyCustomerOtp
Public: no authentication required.
Verifies the OTP and logs the customer in. Blocked (ForbiddenException) until the partner is ACTIVE — a pending self-registered customer sees the pending-approval message instead of a session.
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 VerifyCustomerOtp($input: VerifyCustomerOtpInput!) {
verifyCustomerOtp(input: $input) {
accessToken
expiresIn
refreshToken
sessionToken
tokenType
user {
id
firstName
lastName
partnerName
avatar
email
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation VerifyCustomerOtp($input: VerifyCustomerOtpInput!) {\n verifyCustomerOtp(input: $input) {\n accessToken\n expiresIn\n refreshToken\n sessionToken\n tokenType\n user {\n id\n firstName\n lastName\n partnerName\n avatar\n email\n }\n }\n}",
"variables": {
"input": {
"code": "string",
"email": "string"
}
}
}
EOF
Variables:
{
"input": {
"code": "string",
"email": "string"
}
}
Response:
{
"data": {
"verifyCustomerOtp": {
"accessToken": "string",
"expiresIn": 0,
"refreshToken": "string",
"sessionToken": "string",
"tokenType": "string",
"user": {
"id": "id",
"firstName": "string",
"lastName": "string",
"partnerName": "string",
"avatar": "string",
"email": "string"
}
}
}
}
verifyCustomerOtp(
input: VerifyCustomerOtpInput!
): CustomerAuthResponse!
Arguments
verifyCustomerOtp.input ● VerifyCustomerOtpInput! non-null input
The details of the verify customer otp request.
Type
CustomerAuthResponse object
The result of a customer sign in.