worker1138
worker1138

Reputation: 2101

Correct URL for verifying reCaptcha

I'm writing a scala backend to verify whether a user has correctly completed a captcha, but I'm unclear which URL to use. The reCaptcha site tells us to use http://www.google.com/recaptcha/api/verify, yet the JSP Java library that I am using as a model uses http://api-verify.recaptcha.net/verify

Any help would be much appreciated to figure out which of these two is correct.

Upvotes: 3

Views: 11555

Answers (2)

Cool Tuck
Cool Tuck

Reputation: 21

This question and answer seems to be too old. Ten years later, the correct url to verify is www.google.com/recaptcha/api/siteverify. You can check this here.

Upvotes: 0

Stefano Sanfilippo
Stefano Sanfilippo

Reputation: 33046

Both of them will work because api-verify.recaptcha.net/verify is an alias for www.google.com/recaptcha/api/verify.

See it for yourself:

me@mylaptop:~$ host api-verify.recaptcha.net
api-verify.recaptcha.net is an alias for www.l.google.com.
www.l.google.com has address 173.194.44.50
www.l.google.com has address 173.194.44.49
www.l.google.com has address 173.194.44.51
www.l.google.com has address 173.194.44.52
www.l.google.com has address 173.194.44.48
www.l.google.com has IPv6 address 2a00:1450:4016:803::1012

Most probably, this is beacuse reCaptcha was acquired by Google, but they did not want to force all people already using it to update their code. Apart from that, the latter is better because it allows to use a SSL encrypted connection.

Upvotes: 1

Related Questions