Skip to content
moxon home

Captcha Verification

The /captcha endpoint verifies an answer submitted for a challenge-mode captcha: send back the token from the X-Captcha-Token header, along with the text the user typed.

posthttps://api.moxon.dev/v5/captcha
Try itpost/v5/captcha

Parameters

The request body must be JSON:

  • tokenstringrequired

    Token from the X-Captcha-Token header

  • answerstringrequired

    Text typed by the user. Case-insensitive, trimmed

Response Fields

  • validboolean

    true if the answer matches

  • reasonstring

    Why it was rejected — absent when valid is true

Rejection Reasons

ReasonMeaning
wrongThe answer does not match the image
expiredThe token is older than 5 minutes
usedThe token was already redeemed — each one works exactly once
invalidThe token is malformed

Code Examples

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a token (?token={token})The token is missing
  • 400Please provide an answer (&answer={answer})The answer is missing
  • get/v5/captcha - Generate a captcha in challenge mode
  • get/v5/pow - Proof of work, the recommended alternative