2

Can I use the streaming API between two orgs? I mean to register for topic changes on one org from another org... If this is possible how can it be done?

0

I haven't tried it, so can't be sure that it would work but in theory it might. Basically, with the Streaming API you are binding a client in javascript to events happening on the server. In that respect, most of the work is done by comted 'client' side:

var init = j$.cometd.init({
    url: 'https://c.na7.visual.force.com/cometd/30.0/',
    requestHeaders: {Authorization: 'OAuth a_valid_session_id_from_other_org'}                    
});

Of course, the problem you're going to have in your 'other' org (i.e. the one where you're binding to the events on the server) is the Session ID. If you can get that, it might just work. I will try it out now.

Edit: seems naive of me to have suggested that it might work, I tried the approach above and I just get 401 (Unauthorized) in my javascript console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.