invalid-request-cookie

239 views
Skip to first unread message

Hein

unread,
Sep 10, 2009, 6:38:52 AM9/10/09
to reCAPTCHA
Hi all

I keep on getting a invalid-request-cookie error, but everything
checks out.

My call to http://api-verify.recaptcha.net/verify has the following
fields and values:

privatekey=[my pvt goes here, removed for this post]
remoteip=[the ip address of the visitor]
recaptcha_challenge_field=[a very long string, as received from the
post of the Captcha applet]
recaptcha_response_field=[the words typed in by the visitor]

No matter what I do, I just get back

RESPONSE=false invalid-request-cookie

According to their site, this means the challenge value is invalid.
The challenge field is not null, it's quite long.

Any help much appreciated please!

Paul Herring

unread,
Sep 10, 2009, 6:43:41 AM9/10/09
to reca...@googlegroups.com
On Thu, Sep 10, 2009 at 11:38 AM, Hein<taq...@gmail.com> wrote:

> My call to http://api-verify.recaptcha.net/verify has the following
> fields and values:

And how is this call being made? Code where the reCAPTCHA's being
generated? Actual URL?

[snip]

> No matter what I do, I just get back
>
> RESPONSE=false invalid-request-cookie
>
> According to their site, this means the challenge value is invalid.
> The challenge field is not null, it's quite long.

Just because it's not null, doesn't mean it's valid.


--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

Hein

unread,
Sep 10, 2009, 7:02:14 AM9/10/09
to reCAPTCHA


On Sep 10, 12:43 pm, Paul Herring <pauljherr...@gmail.com> wrote:
> On Thu, Sep 10, 2009 at 11:38 AM, Hein<taq...@gmail.com> wrote:
> > My call tohttp://api-verify.recaptcha.net/verifyhas the following
> > fields and values:
>
> And how is this call being made? Code where the reCAPTCHA's being
> generated? Actual URL?
>
I call the http://api-verify.recaptcha.net/verify url from out my
server application, after receiving the post variables from my form,
including whats part of the recaptcha object.

My Form is on:

http://uhp.silvo.homeip.net/uhp.dll/Showpage?PN=BookingForm.htm&PackageName=123

Click submit and you will see the result at the bottom of the debug
screen.

>
> Just because it's not null, doesn't mean it's valid.
>
Fair enough, but I just pass on the value in the post received in my
app.

Thanks for your help!

DebCV

unread,
Sep 13, 2009, 10:34:13 PM9/13/09
to reCAPTCHA
you have many errors that should be cleaned up first....


http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fuhp.silvo.homeip.net%2Fuhp.dll%2FShowpage%3FPN%3DBookingForm.htm%26PackageName%3D123

On Sep 10, 4:02 am, Hein <taq...@gmail.com> wrote:
> On Sep 10, 12:43 pm, Paul Herring <pauljherr...@gmail.com> wrote:> On Thu, Sep 10, 2009 at 11:38 AM, Hein<taq...@gmail.com> wrote:
> > > My call tohttp://api-verify.recaptcha.net/verifyhasthe following
> > > fields and values:
>
> > And how is this call being made? Code where the reCAPTCHA's being
> > generated? Actual URL?
>
> I call thehttp://api-verify.recaptcha.net/verifyurl from out my
> server application, after receiving the post variables from my form,
> including whats part of the recaptcha object.
>
> My Form is on:
>
> http://uhp.silvo.homeip.net/uhp.dll/Showpage?PN=BookingForm.htm&Packa...

Hein

unread,
Sep 18, 2009, 11:30:34 AM9/18/09
to reCAPTCHA


On Sep 14, 4:34 am, DebCV <ads....@gmail.com> wrote:
> you have many errors that should be cleaned up first....
>
> http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fuhp.silvo.ho...
>

Thanks, but that's not it.

I've simplified the form to make it easier. The "errors" from that
validator shows to the reCAPTCHA code itself, not mine.

I still get "false invalid-request-cookie" and have no clue what's
causing it.

Ast Derek

unread,
Sep 19, 2009, 12:07:52 PM9/19/09
to reCAPTCHA
You are right, the params are the correct ones. If the params are
right, then maybe your code is having some trouble at posting this
data to reCAPTCHA.

By the way, you have compromised your private key (is not mispelled by
mistake?).

Hein

unread,
Sep 19, 2009, 2:54:52 PM9/19/09
to reCAPTCHA
Thanks for you reply, I've copied and pasted, making sure that I've
got it correct.

Ast Derek

unread,
Sep 20, 2009, 8:39:53 AM9/20/09
to reCAPTCHA
Next step to help you would be to see a piece of code, since other
common errors are not present.

Hein

unread,
Sep 22, 2009, 5:26:28 AM9/22/09
to reCAPTCHA
For code, you can just view source on this link:

http://uhp.silvo.homeip.net/uhp.dll/Showpage?PN=BookingForm.htm&PackageName=123

On the server side, here's my Delphi code, which basically takes the
posted fields and post it to the recaptcha url:

IdHTTP:= TIdHTTP.Create(nil);
Stream := TIdMultipartFormDataStream.Create;
ResponseStream:= TStringStream.Create('');
PrivateKey:= '6Lc1MwgAAAAAAIzZSu65gPq_B5RlQrOPPvye8yxw';
RemoteIp:= Request.RemoteAddr;
RCF:= Request.ContentFields.Values ['recaptcha_challenge_field'];
RRF:= Request.ContentFields.Values ['recaptcha_response_field'];
Stream.AddFormField('privatekey',PrivateKey);
Stream.AddFormField('remoteip',RemoteIp);
Stream.AddFormField('recaptcha_challenge_field',RCF);
Stream.AddFormField('recaptcha_response_field',RRF);
IdHTTP.Post('http://api-verify.recaptcha.net/
verify',Stream,ResponseStream);
IdHTTP.Disconnect;
IdHTTP.Free;

which returns the response which I just return as the response:

Response.Content:= 'REQ: '+PrivateKey+','+RemoteIp+','+RCF+','+RRF
+#13#10'<BR>RESPONSE='+ResponseStream.DataString

Thanks,
Hein
Reply all
Reply to author
Forward
0 new messages