Send invitation to any user of google chats (is it possible?)
Posted
by Gizzo
on Stack Overflow
See other posts from Stack Overflow
or by Gizzo
Published on 2010-05-18T14:40:30Z
Indexed on
2010/05/19
6:50 UTC
Read the original article
Hit count: 200
Hi
I try to realize simple code on perl which should just get/send messages from/to gtalk accounts. I use Net::XMPP::*
modules. All works just fine for users, who are my friends (in my "buddy" list). But i can't send message to unknown user. I know, that for this case i must send an invitation first, but
Net::XMPP::* don't provide this possibility. There is only one way to invite person - construct my own xml according
to "XEP-0155 Stanza Session Negotiation" protocol. But this doesn't work correct. When i send xml to server, it
returns error "service-unavailable".
I send:
<message to='[email protected]'>
<sxde xmlns='http://jabber.org/protocol/sxde'
xmlns:sxde='http://jabber.org/protocol/sxde#metadata'
session='0AEF4278DC4B6577'
id='b'>
<negotiation>
<invitation>
<feature var='http://jabber.org/protocol/whiteboard' />
</invitation>
</negotiation>
</sxde>
</message>
before my message.
ANSWER:
<message from='' to='[email protected]/TALKCDDCCE63' type='error'>
<sxde id='b' session='0AEF4278DC4B6577' xmlns='http://jabber.org/protocol/sxde' xmlns:sxde='http://jabber.org/protocol/sxde#metadata'>
<negotiation>
<invitation>
<feature var='http://jabber.org/protocol/whiteboard'/>
</invitation>
</negotiation>
</sxde>
<nos:x value='disabled' xmlns:nos='google:nosave'/>
<arc:record otr='false' xmlns:arc='http://jabber.org/protocol/archive'/>
<error code='503' type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</message>
Maybe i lost smth or should send another info before (or after..) ?
Or maybe there are another way to send message without any invitation?
Thanks in advance
© Stack Overflow or respective owner