1 Reply Latest reply on Oct 31, 2017 8:39 AM by janicemak

    Cannot use Jive API call 'https://adpworks.jiveon.com/api/core/v3/....' directly in HTML ajax codes


      I am a developer from ADP Associate Portal team and ADP associates can access Jive ADPWorks after login Portal.

      We created portlet in Portal by using Jive API to retrieve data from ADPWorks.

      However, we built up our API (in NodeJS) which call adpworks API with system credential "api@test.com/service" and then front-end HTML call NodeJS API to retrieve data.

      We cannot use Jive API call 'https://adpworks.jiveon.com/api/core/v3/....' directly in HTML ajax codes,

      it will cause the error: "XMLHttpRequest cannot load https://adpworks.jiveon.com/api/core/v3/contents..... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://ADPDevPortal.com' is therefore not allowed access. The response had HTTP status code 401.".

      It’s because of the CORS issue and we cannot call REST API from a different domain in HTML javascript running in the browser unless the domain allows it.

      I think JIVE's domain only allow certain ADP domain but not sure since I am not internet security guy. Any help or suggestion will be appreciated. Thanks.