01-29-2016 10:32 AM
Hi
Since subscriptions are persistent, I figured I'd try to query if I'm already subscribed to a node after connecting. While I do get a response, it is always 403, even when I query the user I'm logged in with.
Am I doing something wrong or is querying the subscription list not supported (and if not.. what's the workaround.. after all applications may crash and you have to clear up things without rebooting the entire cluster).
Here's the request and answer that go over the wire
<iq id="MX_15" type="get" to="pubsub.chdevuccx105.nxodev.intra"><pubsub xmlns="http://jabber.org/protocol/pubsub#owner"><subscriptions node="/finesse/api/User/lsste" /></pubsub></iq>
<iq type="error" id="MX_15" from="pubsub.chdevuccx105.nxodev.intra" to="lsste@chdevuccx105.nxodev.intra/MatriX"><pubsub xmlns="http://jabber.org/protocol/pubsub#owner"><subscriptions node="/finesse/api/User/lsste"/></pubsub><error code="403" type="auth"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
Solved! Go to Solution.
02-29-2016 02:05 AM
Thanks, that got me on the right track
Here's a working command that I managed to send in Pidgin
<iq to='pubsub.chdevuccx105.nxodev.intra' id='console8d6ddcb4' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscriptions/>
</pubsub>
</iq>
Somehow, the Matrix library keeps generating this
<iq to='pubsub.chdevuccx105.nxodev.intra' id='console8d6ddcb4' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<subscriptions />
</pubsub>
</iq>
And that doesn't work. Now that I know what is working I can ask the makers of Matrix how I can adapt my method calls to get this working.
One thing.. I take it subscriptions are 'per server'.. so if I subscribe on the primary server, and it goes down I have to make the same subscriptions again on the secondary, correct?
02-01-2016 04:32 PM
I see there is a 403 access denied. Could I ask what the scenario is? Is this regarding gadget development?
02-02-2016 12:09 AM
It's a server to server scenario... I'm trying to deal with switchover and disconnect scenarios so before subscribing again I'd like to know what will already delivered to me.
02-02-2016 05:28 PM
How are you authenticating for the API call? Since its a 403, that could be the first issue to review.
02-03-2016 12:52 AM
I authenticate normally.. it's XMPP, so I'm connecting with the credentials of an agent. As I'm getting all the messages for user and dialog changes, things seem to be in order. I can also subscribe for notifications for other users and teams and then do get their events.. so all seems to be in order. All that happens in the context of the one XMPP connection so there's no per call authentication like there is with the REST API.
02-26-2016 10:19 AM
Can you try example 20 here: http://www.xmpp.org/extensions/xep-0060.html#entity-subscriptions
<iq type='get'
from='francisco@denmark.lit/barracks'
to='pubsub.shakespeare.lit'
id='subscriptions1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscriptions/>
</pubsub>
</iq>
02-29-2016 02:05 AM
Thanks, that got me on the right track
Here's a working command that I managed to send in Pidgin
<iq to='pubsub.chdevuccx105.nxodev.intra' id='console8d6ddcb4' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscriptions/>
</pubsub>
</iq>
Somehow, the Matrix library keeps generating this
<iq to='pubsub.chdevuccx105.nxodev.intra' id='console8d6ddcb4' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<subscriptions />
</pubsub>
</iq>
And that doesn't work. Now that I know what is working I can ask the makers of Matrix how I can adapt my method calls to get this working.
One thing.. I take it subscriptions are 'per server'.. so if I subscribe on the primary server, and it goes down I have to make the same subscriptions again on the secondary, correct?
02-29-2016 09:22 AM
Correct. Subscriptions are per server so if the primary server goes down, you would need to redo the subscriptions.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide