Skip to main content

MISSING_REQUIRED_PARAM

Encountering an error? Get help with AI tools

Error Cause​

A required client parameter is missing. This is a 4xx frontend input problem, not an SMS/email channel misconfiguration.

The SDK sets error.code === "missing_required_param" (errorCode 4000). error.message includes the call site and param path, for example:

auth.verifyOtp(params): missing required param 'messageId'

When it happens​

PhaseTriggering methodCommon missing field
SendsignInWithOtp / signUp / getVerificationMissing email or phone
VerifyStandalone auth.verifyOtpMissing messageId

Do not treat this as “the backend email job is missing an ID”. If standalone verifyOtp reports a missing messageId, the frontend did not pass back the ID returned by the send API.

Solution​

  1. Read error.message and fill the method and field it names.
  2. Missing messageId during verify:
    • If you sent the code with getVerification, pass verification_id as params.messageId to auth.verifyOtp.
    • Prefer data.verifyOtp({ token }) from signInWithOtp / signUp. The SDK already cached messageId.
  3. Missing email/phone during send: provide one of them. Do not leave both empty.
  4. If error.code is unimplemented / internal (5xx), the channel or server is misconfigured. Enable SMS/email login in the console.