12 Replies Latest reply on Oct 25, 2016 2:09 PM by dmariano002

    Jive REST API call from Jive hosted App - 401 Error

    nallasivam.jive

      When i call a Jive REST API from Jive hosted App using osapi.http.get, i am getting 401 error in the response Object which can see in console log, but the actual response not received.

      But if i access the URL through browser directly without calling from App, i am getting the correct response as a content in browser without any error

       

      Can anyone help ? I am not sure what i am missing in this call.

       

      Here is my code

       

      osapi.http.get({

        'href': loc + "/api/core/v3/places/" + placeid + "/appliedEntitlements",

        'noCache': true,

        'authz': 'signed'

        }).execute(

         function(response) {

       

        console.log(response);

        alert('response received');

         }

        );

       

      Note: App calls the REST API and that too after logged into Jive host.

       

      Here is the screen shot for the browser console and you can see the 401 status error from the response object.