Skip to main content
Question

Malformed Token for Invisible Token

  • March 5, 2026
  • 2 replies
  • 41 views

marlontrujilloariza
Forum|alt.badge.img

Hi, I’m been facing into issue where when trying to validate a captcha token, I get a malformed token error. I’m not sure if its possible to gather more info on why its being malformed. It works when using a test site key, but once I switch to the prod site key it consistently returns a malformed error. 

tokenProperties: {

createTime: "1970-01-01T00:00:00Z"

invalidReason: "MALFORMED"

valid: false

}

any help is appreciated 


 

2 replies

JoshD
Staff
Forum|alt.badge.img+2
  • Staff
  • March 17, 2026

MALFORMED indicates that when you issued a create assessment call (to the API at googleapis.com), Google did not receive the full expected token. Some common causes of this include truncating the token or storing the token in a length-limited field. The token can vary in size by quite a bit, and it is important you do not reduce its length or otherwise modify it before creating an assessment. 

Hopefully this helps!


marlontrujilloariza
Forum|alt.badge.img

hmmm ok I’ll see how I can track down where its being truncated