Tuesday, February 06, 2007

Google Talk URLs

I've been meaning to post this for a while, but was holding off until all the pieces were in place. But now that CustomizeTalk has scooped me on this topic, I figure I ought to publish it ASAP...

Did you know that Google Talk has its own URL scheme? These "gtalk" URLs can be embedded in web pages or desktop shortcuts to make it easy to message or call someone from Talk. Right now, the two supported URLs are:

gtalk:chat?jid=foo@gmail.com (starts a chat)

and

gtalk:call?jid=foo@gmail.com
(starts a call)

Simply replace "foo@gmail.com" with the XMPP ID of the person you want to chat with/call and you're all set.

If you use multiple accounts, you can also add the "from_jid" parameter to the URL to control which account the message is sent from. Here's an example of a URL using from_jid:

gtalk:chat?jid=foo@gmail.com&from_jid=bar@gmail.com

As mentioned above, "call" and "chat" are the only URL commands currently supported. If you specify any other string, invoking it will simply cause the Talk client to come to the foreground.

Update: previously I had mentioned that you could use these links to put a "contact me with Gtalk" button on a web page. I goofed; the currently released version of Google Talk won't bring up the invitation UI when these URLs are invoked, so you can't do this quite yet.

9 comments:

Lars said...

Why not support the standard XMPP URIs as defined in RFC4622? Using the examples from the post the XMPP URIs are xmpp:foo@gmail.com (or xmpp:foo@gmail.com?message), xmpp:foo@gmail.com?call (the 'call' querytype could be registered with the XMPP Registrar), and xmpp://bar@gmail.com/foo@gmail.com respectively.

Ian said...

Will this only work if the person you're trying to contact is in your contact list? If so, doesn't it makes having a link on yout website/blog a little pointless, since the link won't do anything?

Anonymous said...

Is there any way to initate the launching of a mail message, I know about mailto:, but Outlook tends to be over zealous with that handler.

Is there any way to put text in the filter textbox on the gtalk cleint?

Singpolyma said...

So dumb... xmpp: was defined for exactly that... everyone else supports that. If Google wants to say they supports standards, then why not actually support standards?

juberti said...

Regarding xmpp: URIs - RFC 4622 was only released in July of 2006. There are more issues involved with supporting "xmpp:" than "gtalk:", (one being that multiple applications may want to handle "xmpp:"), but we'll definitely be looking into this .

freechelmi said...

It's really a shame that they are trying to create this Gtalk only URI; xmmp URI are alreadyu there as said before, So if you signed on Gtalk with another Jabber client, it will work.

Dell80 said...

this is great I've been looking for this info, I don't see what the big fuss is about, it would be great if if google talk supported xmpp: but most xmpp clients don't even have xmpp uri handlers, or if they do they don't support them properly, so this works for now

Anonymous said...

Thanks, worked like a charm.

JayJay said...

Hi there is this link still supposed to work? It doesn't seem to work for me or is that just because i use Firefox?