Skip to main content

Verification endpoint

This endpoint is used for the following operations:

  • Verifying the phone number that you set in the registration request, using the responses from the registration endpoint.
  • Verifying the phone number or recovery code that is used for authentication.

HTTP request

POST https://{instance}.mauth.nevis.cloud/api/v1/users/{userId}/verification

Path parameters

ParameterTypeRequired/OptionalDescription
userIdUUIDrequiredPath parameter that represents the user that is the subject of this registration operation. This UUID is part of the API endpoint, as each user has a verification endpoint.

Request body parameters

ParameterTypeRequired/OptionalDescription
codestringrequiredEither a multi-digit code that the user received on their phone as a text message for phone number registration, or an alpha-numeric code containing dashes, received from the recovery codes registration endpoint.
statusTokenstringrequired for SMS authenticationStatus token returned by the registration response.
channelstringrequired for recovery code authenticationRepresents the authentication channel. You can set it to the following values: sms, recovery.

Example HTTP request

cURL code sample to verify the phone registration
curl -v -X POST https://$instance.mauth.nevis.cloud/api/v1/users/$userId/verification \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $access_key" \
-d "{ \"code\":\"$code\",
\"statusToken\":\"$statusToken\" }"

HTTP response

The response is either an HTTP/1.1 200 if the verification is successful, or an HTTP/1.1 4xx if the verification fails.

HTTP/1.1 200 OK