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
| Phase | Triggering method | Common missing field |
|---|---|---|
| Send | signInWithOtp / signUp / getVerification | Missing email or phone |
| Verify | Standalone auth.verifyOtp | Missing 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
- Read
error.messageand fill the method and field it names. - Missing
messageIdduring verify:- If you sent the code with
getVerification, passverification_idasparams.messageIdtoauth.verifyOtp. - Prefer
data.verifyOtp({ token })fromsignInWithOtp/signUp. The SDK already cachedmessageId.
- If you sent the code with
- Missing
email/phoneduring send: provide one of them. Do not leave both empty. - If
error.codeisunimplemented/internal(5xx), the channel or server is misconfigured. Enable SMS/email login in the console.