Has anyone successfully created an non-interactive workflow. Basically, what I am trying to accomplish is this. From my CRM, I am trying to do a Valance API callout to my LMS that will create an LMS user when the user is created in the CRM. This needs to occur without any "human interaction". I am using the Valance Java SDK (https://github.com/Desire2Learn-Valence/valence-sdk-java) as a framework for my code, at at its core, am executing this Flow:
- D2LAppContext DAC = new D2LAppContext(aid,key);
- URL targetURL = new URL(protocol+endpt + actiontype);
- URL authEP = DAC.createWebUrlForAuthentication(endpt , hport, targetURL);
- httprequest (Get) authEP (which returns a 200 status code - OK)
- ID2LUserContext DUC = DAC.createUserContext(authEP, endpt, hport, true); ( I have also tried this with passing the userid and userkey generated from the API test application, based on logging in as an interactive user.
- URL userURL = DUC.createAuthenticatedUri(actiontype, 'GET');
- httprequest (Get) userURL (which returns a 403 status code - Forbidden)
Does anyone have a suggestion on how to accomplish this? One question I have is which userid and userkey is the API expecting? The one I use to login to the LMS with via the UI? Or something returned from the Authorization call? Thanks! Jim