4 Replies Latest reply on Nov 4, 2014 1:09 PM by ryanrutan

    How to add custom javascript in cloud instance (or use full osapi)?

    michael_yegorov

      Client runs cloud jive instance and he wants to be able to do custom writing operations like liking, sharing and commenting contents.

       

      This is impossible to do by HTML widget + REST because widget with scripts is being wrapped into an iframe and under the iframe REST POST actions are prohibited without separate authentication (which is not an option). These queries require X-J-Token and without it tells "The request could not be validated as originating from within the SBS application" even though browser have authentication cookies on the same domain.

       

      From within an iframe I can access parent window scope and access osapi, but in our instance osapi is either disabled or limited, in example - it's "corev3" field only have "extentions" object in it, nothing like "people" or something.

       

      Other way is to upload custom javascript to jive global scope, like it is possible on hosted instances by modifying theme or editing a sysyem property. But those options are obviously not available in cloud. What is left - is add-ons/apps.

       

      So, in general the questions are:

      1) is it possible to upload such an add-on in cloud that will run included javascript on every page of jive instance without a need to be initiated by every user? This means I need the kind of add-on that can be uploaded and enabled by admin once and that then will run on every jive page (or at least a selected kinds of pages, for example every space and group's overview page) ever since?

       

      2) Is it possible to turn osapi on in it's full form in cloud? I need to be able to post comments, share and like articles with it.

       

      Ryan Rutan maybe you can help?