New Wave Robots API v2 & New Wave-Based Forum

123 views
Skip to first unread message

pamela (Google Employee)

unread,
Mar 2, 2010, 9:46:37 AM3/2/10
to Google Wave API, google-wave...@googlegroups.com

We have now released the Wave Robots API v2, which we have been alluding to in various forum posts here. This API makes it easy for developers to push information to waves (like on cron jobs or from websites), and it also resolves a lot of issues developers had with the old API (not all, but many).

For more information on the new API, read through through the launch blog post.

Additionally, as part of this release, we're experimenting with holding discussions about the new API in Google Wave itself. We've actually created a robot to help facilitate these conversations, and you can read more about how to join in on the discussions on the Wave API Forum Botty page.

As noted on that page, we will still continue to monitor this group for posts, and if you are unable or unwilling to use the wave-based forum for whatever reason, feel free to post your questions here.


Matias Molinas

unread,
Mar 2, 2010, 10:22:01 AM3/2/10
to google-...@googlegroups.com
The improvements seem very useful.
Thanks

> --
> 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.
>

Olemis Lang

unread,
Mar 2, 2010, 12:13:17 PM3/2/10
to google-...@googlegroups.com
> On Tue, Mar 2, 2010 at 11:46 AM, pamela (Google Employee)
> <pame...@gmail.com> wrote:
>> We have now released the Wave Robots API v2,
>>
>
On Tue, Mar 2, 2010 at 10:22 AM, Matias Molinas
<matias....@gmail.com> wrote:
> The improvements seem very useful.

I second this ;o)

> Thanks

Keep up the good work !

PS: /me published spanish translation of the announcement here [1]_ ,
hope u don't mind ;o)

For further comments pls contact me .

.. [1] Robots activos para Google Wave: introducción a la versión 2 de la API
(http://simelo-es.blogspot.com/2010/03/google-wave-developer-blog-introducing.html)

--
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:
Support micro-seconds as added by Trac in revision 9210 for upcoming
0.12... - http://bitbucket.org/osimons/trac-rpc-mq/changeset/62ffe719a84a/

Eric Kolotyluk

unread,
Mar 3, 2010, 4:30:51 PM3/3/10
to google-...@googlegroups.com
I'm trying to follow the Authenticating Your Robots instructions but nothing tells me how to create the handler the registration page calls for.

Please create a new handler at http://pressybot.appspot.com/_wave/verify_token?st=#### that responds with that token. The server will contact your robot at that URL to verify the token. You can use the st query parameter to ensure that the request is coming from our server.

Once you have created the handler, please click the Verify button below.

It would be nicer if the tutorial was complete instead of assuming you already know how to do this. For example, if you created a robot using the Robot Tutorial how would you modify the robot to add the handler?

Cheers, Eric

Eric Kolotyluk

unread,
Mar 3, 2010, 5:44:12 PM3/3/10
to google-...@googlegroups.com
I'm just getting my feet wet. I followed the Robot Tutorial and was able to upload my robot to appspot.com and test it in my wave preview account.

I was a little disappointed that the avatar for the robot looks the same as for people who have not updated their pictures. Is that really the default avatar for robots or is something wrong with the deployment?

Also, the profile card for the robot does not seem to use the robot's name, it just uses the my...@appspot.com address. For example getRobotName() returns "Pressy" but that is not displayed in the profile.

Anyway, adding the robot to a wave seems to work as expected.

Now to the meat of the matter. When I use my sandbox account and add my robot - pres...@appspot.com - to my list of contacts, if I add that contact entry to a wave nothing happens, the robot does not work.

I don't think I'm understanding the relationship between developing extensions for the wave preview and the sandbox, and I cannot find any good discussion on this in the Google Wave API pages.

Cheers, Eric

Thomas Jungblut

unread,
Mar 4, 2010, 9:55:39 AM3/4/10
to Google Wave API
@Eric

The profiles are still disabled, you can not see an avatar or the
realname.

If you add your robot to a wave short after deployment it needs to be
cached, in the wave itself you won't see any changes, but if you are
working with datastorages you can see the robot perform altough
nothing happens "outside".
In the AppEngine overview you can also see the robot "working".

Actually the developing for wave preview and sandbox is the same. I do
not understand what you are asking for, the sandbox only gives you
other features like XML export, annotationview... whatever more.

So back to Topic:
Thanks Pamela for (announcing) the new API, couldn't really look
inside but I can't wait to iterate over all blips ;)
Do you update your exporty bot with the iteration?
I guess you know, that I am hosting the "java-export-brother" portexy
and will update it in 1-2 weeks. Currently working on a PDF export.

Do you have an exact usecase of the active part of the api? I've seen
Austin's Googlecode bot and I was really impressed!
Good work devs' :D

Eric Kolotyluk

unread,
Mar 4, 2010, 11:10:06 AM3/4/10
to google-...@googlegroups.com
After uploading my robot to appspot.com I was able to add it to my contact list in the preview wave - pres...@appspot.com - and then I was able to create a new wave and add it to that. As it was the robot used in the tutorial I could immediately see that it was functioning because it added some blips to the wave.

Then I went to my sandbox and added my robot to my contact list. After creating a new wave I added the robot to the wave, but nothing happens, no new blips appear. So way does the robot work in the preview wave but not in the sandbox wave?

Cheers, Eric

pamela (Google Employee)

unread,
Mar 4, 2010, 4:43:16 PM3/4/10
to google-...@googlegroups.com
Hi Eric--

Have you looked at the logs? I recommend always keeping your logs open at the same time as testing your robot. It will show you the incoming/outgoing JSON, and any errors.
Info on debugging with logs is here:

- pamela

--

Eric Kolotyluk

unread,
Mar 4, 2010, 4:54:24 PM3/4/10
to google-...@googlegroups.com
Thanks. Found the problem - a typo in the bot name in my sandbox contacts.

Cheers, Eric

Eric Kolotyluk

unread,
Mar 4, 2010, 7:29:23 PM3/4/10
to google-...@googlegroups.com
OK, I'm playing around with the Active API.

I finally figured out how register. It would help a lot more if the documentation had a decent example. For example:

  public void init (ServletConfig config) throws ServletException {
    this.config = config;
    String previewVerificationToken = "..."; // the string taken from the registration page
    String previewSecurityToken = "1234"; // the number taken from the registration page
    setupVerificationToken(previewVerificationToken, previewSecurityToken);
  }

and I got my consumer key and secret from the registration page.

So I changed my robot to

  public void init (ServletConfig config) throws ServletException {
    this.config = config;
    setupOAuth(previewConsumerKey, previewConsumerSecret, "http://gmodules.com/api/rpc");
  }

but now my robot does not work and in the log I get (see below). What's going, was my registration successful or not?

Cheers, Eric

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)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
	at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:313)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
	at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
	at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
	at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5485)
	at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5483)
	at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
	at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)
	at com.google.net.rpc.impl.Server$2.run(Server.java:837)
	at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
	at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536)
	at com.google.net.rpc.impl.Server.startRpc(Server.java:792)
	at com.google.net.rpc.impl.Server.processRequest(Server.java:367)
	at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448)
	at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
	at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
	at com.google.net.async.Connection.handleReadEvent(Connection.java:474)
	at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:774)
	at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205)
	at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
	at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
	at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394)
	at java.lang.Thread.run(Unknown Source)

pamela (Google Employee)

unread,
Mar 5, 2010, 9:05:26 PM3/5/10
to google-...@googlegroups.com
Thanks for the feedback, Eric, we'll clarify that section to show where to put the code. It's non-obvious in Java.

For reference, the Buggy sample uses Java SDK and the active API. The relevant code is in the constructor:

I'll clarify the docs to show it inside a constructor.

- pamela

--

Toub

unread,
Mar 7, 2010, 5:53:24 PM3/7/10
to Google Wave API
Hi,

Thanks for this information.

I still not understand how the example robot retrieve the system
property, if it is hosted by App Engine:

OAUTH_TOKEN = System.getProperty("OAUTH_TOKEN")


How can I set this property ?


Thanks

On 6 mar, 03:05, "pamela (Google Employee)" <pamela...@gmail.com>
wrote:


> Thanks for the feedback, Eric, we'll clarify that section to show where to
> put the code. It's non-obvious in Java.
>
> For reference, the Buggy sample uses Java SDK and the active API. The

> relevant code is in the constructor:http://google-wave-resources.googlecode.com/svn/trunk/samples/extensi...
>
> <http://google-wave-resources.googlecode.com/svn/trunk/samples/extensi...>I'll


> clarify the docs to show it inside a constructor.
>
> - pamela
>

> On Thu, Mar 4, 2010 at 8:30 AM, Eric Kolotyluk <eric.koloty...@gmail.com>wrote:
>
> >  I'm trying to follow the Authenticating Your Robots<http://code.google.com/apis/wave/extensions/robots/operations.html#Ac...>instructions but nothing tells me how to create the handler the registration


> > page calls for.
>
> > Please create a new handler at

> >http://pressybot.appspot.com/_wave/verify_token?st=####that responds with


> > that token. The server will contact your robot at that URL to verify the

> > token. You can use the *st* query parameter to ensure that the request is
> > coming from our server.
>
> > Once you have created the handler, please click the *Verify* button below.


> >  It would be nicer if the tutorial was complete instead of assuming you
> > already know how to do this. For example, if you created a robot using the Robot

> > Tutorial<http://code.google.com/apis/wave/extensions/robots/java-tutorial.html>how would you modify the robot to add the handler?


>
> > Cheers, Eric
>
> > --
> > 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<google-wave-api%2Bunsu...@googlegroups.com>

pamela (Google Employee)

unread,
Mar 10, 2010, 12:22:06 AM3/10/10
to google-...@googlegroups.com
You can simplify that by storing it in a separate file or the code itself.

I am modifying the docs to say the following:

To authenticate in Java, call setupOauth in the constructor for your robot. See the sample code below:

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

Those two parameters can just be local String contants.

- pamela


To unsubscribe from this group, send email to google-wave-a...@googlegroups.com.

Conrado Plano

unread,
Mar 15, 2010, 4:12:29 AM3/15/10
to Google Wave API
Hi Pamela

I am trying to create a small robot with the Active API and have being
following the tutorial from the documentation, as well as reading the
code from Buggy. The only thing I want the robot to do, is to create a
new Wave with every participant of a wave where it is added. I have
managed to verify the robot using the following code in the
constructor (with the values assigned to the robot):

String verificationToken = "...";
String securityToken = "...";
setupVerificationToken(verificationToken, securityToken);

However when I try to authenticate the robot with this (with the
values I get form the site):

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

I get the following error and the robot does not work.

Could you please give me some advice as to what I may be doing wrong?

Thanks, regards
Conrado

On Mar 10, 6:22 am, "pamela (Google Employee)" <pamela...@gmail.com>
wrote:

> > > > google-wave-a...@googlegroups.com<google-wave-api%2Bunsubscribe@ googlegroups.com>
> > <google-wave-api%2Bunsu...@googlegroups.com<google-wave-api%252Bunsubsc ri...@googlegroups.com>


>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-wave-api?hl=en.
>
> > --
> > 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<google-wave-api%2Bunsubscribe@ googlegroups.com>

Reply all
Reply to author
Forward
0 new messages