After hundreds of bot accounts being created, I’m tinkering with reCAPTCHA (v2). The problem is that one of my n8n workflows that creates users is now being blocked.
When I POST /users.json with an admin API key returns {"success":false,"message":"Captcha verification failed"}.
What I’ve found:
- It fails with or without
active/approvedin the request, so it isn’t the activation parameters. With the captcha off, the same request succeeds. - The captcha check seems to need a token that only comes from the browser signup form, and I don’t see an exemption for API requests.
POST /admin/usersisn’t an alternative. It returns 404 even with a valid admin key. The same key returns 200 onGET /admin/users/list/active.json, so the key is fine.- The reCAPTCHA settings in Google’s console don’t help, since the request is rejected before Discourse contacts Google. I don’t expect reCAPTCHA v3 or hCaptcha to help either, since the missing-token check seems to run first.
Is there a supported way to create users through the API while the captcha is on? If not, would an “admin API requests skip the captcha” option make sense as a feature request?