Allan,

Use OAuth to fetch the captcha (the same way you are using to call the rpc
message).

-Robson Dantas

2010/7/15 Prashant (Google) <[email protected]>

> Allann,
>
> You'll have to use the same auth mechanism as in all other requests
> for fetching the captcha URL too, using the security token you got.
> You can refer to the example in the CaptchaServlet link posted above.
>
> Prashant
>
> On Jul 15, 1:54 am, Allann Jones <[email protected]> wrote:
> > Sorry. "httpd" is a typo on mail message, I'm trying:
> >
> >
> http://sandbox.orkut.com/social/pages/captcha?xid=1234567890http://www.orkut.com/social/pages/captcha?xid=1234567890
> >
> > And getting 404 error.
> >
> > Thank you.
> >
> > 2010/7/14 Allann Jones <[email protected]>:
> >
> >
> >
> >
> >
> > > I'm getting the following response trying to create a message:
> >
> > > {"error":{"message":"unauthorized: 상자에 표시된 텍스트를
> > >
> 입력하세요.","data":{"errorType":"requiresCaptcha","captchaUrl":"/social/pages/c
> aptcha?xid=1234567890","captchaToken":"token1234567890"},"code":401}}
> >
> > > I'm using sandbox, then I made a GET request to
> >
> > > httpd://sandbox.orkut.com/social/pages/captcha?xid=1234567890
> >
> > > then I get the  a 404 response error:
> >
> > > <HEAD>
> > > <TITLE>Not Found</TITLE>
> > > </HEAD>
> > > <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > > <H1>Not Found</H1>
> > > <H2>Error 404</H2>
> > > </BODY>
> > > </HTML>
> >
> > > The same occurs requesting to
> > > httpd://www.orkut.com/social/pages/captcha?xid=1234567890
> >
> > > Where is the error that I am missing?
> >
> > > 2010/7/12 Robson Dantas <[email protected]>:
> > >> Aha!
> > >> I got stuck with the same problem. No way, you will need to fetch the
> > >> captcha, and it is random!
> > >> Check more details here:
> > >>http://orkut-os-client.googlecode.com/hg/README
> > >> "4. Captcha handling
> >
> > >>       The API may occasionally throw Captchas to validate that it's
> indeed a
> > >> human
> > >>       issuing the requests, for example, for the very frequent scrap
> posts.
> > >> Captchas
> > >>       can be expected any time and, in general, every transaction
> should ideally
> > >> be
> > >>       checked for a Captcha challenge.
> >
> > >>       A brief overview of how to handle a captcha can be found here:
> > >>
> http://code.google.com/p/orkut-os-client/source/browse/java/src/com/g....
> >
> > >>       A typical image URL returned from the challenge is
> > >>       /social/pages/captcha?xid=yyy. That must be prefixed with the
> endpoint URL
> > >>       (http://www.orkut.com), and then the Captcha image must be
> retrieved from
> > >> the
> > >>       complete URL (http://www.orkut.com/social/pages/captcha?xid=yyy)
> using
> > >> OAuth.
> >
> > >>       For a more concrete example, please refer to the source of our
> reference
> > >>       implementation -- Fotoscrapr -- that can be found at:
> > >>
> http://code.google.com/p/orkut-os-client-greetings/source/browse/src/....";
> >
> > >> Regards,
> >
> > >> Robson Dantas
> >
> > >> 2010/7/12 Allann Jones <[email protected]>
> >
> > >>> Hi. When I try to create (send) a message with the command:
> >
> > >>> { 'method' : 'messages.create', 'userId':['1234567890'], 'params':
> > >>> {'groupId' : '@self', 'messageType':'public_message', 'message' : {
> > >>> 'body' : 'Message body' } } }
> >
> > >>> I get the following answer:
> >
> > >>> {"error":{"message":"unauthorized: 상자에 표시된 텍스트를
> >
> > >>>
> 입력하세요.","data":{"errorType":"requiresCaptcha","captchaUrl":"/social/pages/c
> aptcha?xid=1258941489942","captchaToken":"token1258941489942"},"code":401}}
> >
> > >>> Is the command correct?
> >
> > >>> Is possible to create a message without the need of a captcha image?
> > >>> If not, what the command to get the captcha image and validate the
> > >>> message to be created?
> >
> > --
> > --
> > Allann Jones
> >
> > "I received the fundamentals of my education in school, but that was
> > not enough. My real education, the superstructure, the details, the
> > true architecture, I got out of the public library. For an
> > impoverished child whose family could not afford to buy books, the
> > library was the open door to wonder and achievement, and I can never
> > be sufficiently grateful that I had the wit to charge through that
> > door and make the most of it." (from I. Asimov, 1994)
>
> --
> You received this message because you are subscribed to the Google Groups
> "orkut Developer Forum" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<opensocial-orkut%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/opensocial-orkut?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.

Reply via email to