It sounds like the API key might not be linked to the right context or domain. Double-check that your key is configured correctly and ensure you're passing all the necessary session details.
For a quick guide on solving reCAPTCHA v2, check out this doc. Should help clear things up!