Setup OAuth for a Java Robot

2 views
Skip to first unread message

Joel Dietz

unread,
Apr 7, 2010, 12:58:09 PM4/7/10
to google-wave-api


The tutorial has this:

public
MyRobot() {

  myRobot.setupOAuth(CONSUMER_KEY, CONSUMER_SECRET, "http://sandbox.gmodules.com/api/rpc");
}

Which I assume should be this:

public MyRobot() {

  this.setupOAuth(CONSUMER_KEY, CONSUMER_SECRET, "http://sandbox.gmodules.com/api/rpc");
}


However, when I start my bot get this error:

Uncaught exception from servlet
java.lang.IllegalArgumentException: No consumer key is found for the RPC server URL:
at com.google.wave.api.AbstractRobot.deserializeEvents(AbstractRobot.java:1018)
at com.google.wave.api.AbstractRobot.processRpc(AbstractRobot.java:859)
at com.google.wave.api.AbstractRobot.doPost(AbstractRobot.java:584)
...

The verification seemed to work yesterday and I am using the Consumer Key and Consumer Secret I received then.


Jd

d3developer.com | twitter.com/fractastical | twitter.com/jdietz | joeldietz.com

Joel Dietz

unread,
Apr 7, 2010, 2:07:11 PM4/7/10
to google-wave-api
Actually, it's the reverse. The Sandbox RPC works but the Wave Preview RPC does not.

This doesn't work:

        setupOAuth(OAUTH_KEY, OAUTH_SECRET, "http://gmodules.com/api/rpc");
       
This does:

      setupOAuth(ConsumerKey, ConsumerSecret, "http://sandbox.gmodules.com/api/rpc");

d3developer.com | twitter.com/fractastical | twitter.com/jdietz

Joe Gregorio (Google)

unread,
Apr 7, 2010, 8:34:00 PM4/7/10
to Google Wave API
There should be a call to setAllowUnsignedRequests(true)
in the constructor, right after calling setupOAuth().

Thanks,
-joe

Joel Dietz

unread,
Apr 7, 2010, 8:54:57 PM4/7/10
to google-...@googlegroups.com
Thought I had that but perhaps not. Working now. Or sort of. I get a timeout error each time I try to fetch a Wavelet:

java.io.IOException: Timeout while fetching: http://gmodules.com/api/rpc?oauth_body_hash=xD&oauth_consumer_key=x&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1270687839&oauth_nonce=x&oauth_version=1.0&oauth_signature=x

d3developer.com | twitter.com/fractastical | twitter.com/jdietz


--
You received this message because you are subscribed to the Google Groups "Google Wave API" group.
To post to this group, send email to google-...@googlegroups.com.
To unsubscribe from this group, send email to google-wave-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.


Reply all
Reply to author
Forward
0 new messages