requestBuyerSignInCode
Public: no authentication required.
Send a 6-digit sign-in code by email and, when the seller has WhatsApp sign-in on, by WhatsApp too. Same gates as requestEmailOtp, but it also answers what became of the WhatsApp half: SENT, PENDING (no answer yet) or NOT_SENT with a reason code. The email always goes.
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 RequestBuyerSignInCode($input: RequestEmailOtpInput!) {
requestBuyerSignInCode(input: $input) {
sent
whatsapp {
status
reason
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RequestBuyerSignInCode($input: RequestEmailOtpInput!) {\n requestBuyerSignInCode(input: $input) {\n sent\n whatsapp {\n status\n reason\n }\n }\n}",
"variables": {
"input": {}
}
}
EOF
Variables:
{
"input": {}
}
Response:
{
"data": {
"requestBuyerSignInCode": {
"sent": true,
"whatsapp": {
"status": "NOT_SENT",
"reason": "NOT_ON_WHATSAPP"
}
}
}
}
requestBuyerSignInCode(
input: RequestEmailOtpInput!
): SignInCodeResult!
Arguments
requestBuyerSignInCode.input ● RequestEmailOtpInput! non-null input
The email address or WhatsApp number, and the subdomain.
Type
SignInCodeResult object
The answer to a sign-in code request.