Recaptcha verification failed - MALFORMED

We are sending the complete body as the documentation explain.
We are trying to send verification code to phone number using sendVerificationCode endpoint. But got "Recaptcha verification failed - MALFORMED". we are sending the complete body as the documentation explain.
 
Actually I am doing this:
2- Call https://identitytoolkit.googleapis.com/v1/accounts:sendVerificationCode with the recaptcha token of the first enpoint call.
The body: "phoneNumber": string, "recaptchaToken": string,
 
Then i get this error:
"CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED"
 
Are we missing something?
 
Thanks
Solved Solved
1 8 6,241
1 ACCEPTED SOLUTION

Hi ShahzadAhmad,
I have met the same issue above. Msg err `"CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED"`.
I fixed it by setup testing phone number in Firebase application and now it worked done!!.

View solution in original post

8 REPLIES 8

Hello ShahzadAhmad,

I would recommend reaching  Support to double check your project why the error message "CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED".

The solution of adding a Test number works, but my question is what happens when you start testing with real phone numbers coz when I do so I get the same error 👉🏾 "CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED".

Hi ShahzadAhmad,
I have met the same issue above. Msg err `"CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED"`.
I fixed it by setup testing phone number in Firebase application and now it worked done!!.

This solution works when testing but what happens when you want to try with an actual phone number as it would be in a live production environment?

How can I see a list of the IPs that have requested the recaptcha evaluation of my page?

still no answer? mine work with test number but encountered "CAPTCHA_CHECK_FAILED : Recaptcha verification failed - MALFORMED" as well.

Same for me.

It works with test numbers but got same error for real numbers.

For me the issue was I had a configuration issue and was enabling the automated testing bypass in my non-integration testing environments.

// Required for automated testing in order to bypass recaptcha
// - when set only the 10 test phone numbers will work
// https://firebase.google.com/docs/auth/web/phone-auth#integration-testing
auth.settings.appVerificationDisabledForTesting = true