verifyEmailOtp
Public: no authentication required.
Verify the 6-digit OTP and return access + refresh tokens.
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 VerifyEmailOtp($input: VerifyEmailOtpInput!) {
verifyEmailOtp(input: $input) {
accessToken
isNewBuyer
refreshToken
userId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation VerifyEmailOtp($input: VerifyEmailOtpInput!) {\n verifyEmailOtp(input: $input) {\n accessToken\n isNewBuyer\n refreshToken\n userId\n }\n}",
"variables": {
"input": {
"code": "string",
"email": "string"
}
}
}
EOF
Variables:
{
"input": {
"code": "string",
"email": "string"
}
}
Response:
{
"data": {
"verifyEmailOtp": {
"accessToken": "string",
"isNewBuyer": true,
"refreshToken": "string",
"userId": "id"
}
}
}
verifyEmailOtp(
input: VerifyEmailOtpInput!
): MobileAuthResponse!
Arguments
verifyEmailOtp.input ● VerifyEmailOtpInput! non-null input
The details of the verify email otp request.
Type
MobileAuthResponse object
The result of a buyer sign in.