D2L Application Authentication

134 views
Skip to first unread message

Luc Aube

unread,
Jun 3, 2014, 2:40:48 PM6/3/14
to valenc...@googlegroups.com
Hello,

We are creating an automated process in .net to handle user creating / course enrolments ect... I'm not really sure how to handle authentication with d2l. I have used the ID2LUserContext to handle the authentication but this requires the user to login through the d2l instance then
gets redirected back to the application with the proper user context information. 

How do I completely remove the user in the authentication process. The automated process needs to do his function without user interactions. 

I was reading something about a Service account in the Valence documentation but did not see anything really useful.

Thanks

Luc

Sean M

unread,
Jun 3, 2014, 3:26:03 PM6/3/14
to valenc...@googlegroups.com
Hi Luc,

Here's a basic step-by-step. We just got done figuring this out.

1. Create a D2L user account with appropriate permissions. This is not a "special" account and has no special settings, checkboxes, etc. It's just a user with rights to see (and possibly alter) the information it needs to operate on.

2. Use the API test tool at https://apitesttool.desire2learnvalence.com/ to manually authenticate with the newly-created user's credentials. You log in just like any other user would.

3. After logging in, the API test tool will have string values in "User ID" and "User Key" boxes. Copy these and store them somewhere secure, but also where your application code can access them.

4. When creating your user context, feed the user ID and user key values you copied into the D2L context object. This is done differently with each language's API. If you run into trouble here, I'd suggest either searching the forum for how to do this, or posting a question specific to your API language.

5. You can now use the resulting context object to send Valence requests just as if your user had authenticated manually.

I'm writing off the top of my head, so do post up if you run into snags. The information on how to do this exists, but it's all over the place and hard to piece together, so I hope this at least gets you going in the right direction.

Good luck!


Luc Aube

unread,
Jun 3, 2014, 3:29:30 PM6/3/14
to valenc...@googlegroups.com
Thank you Sean I will give this a try.

Luc

Desire2Learn Staff: Viktor

unread,
Jun 4, 2014, 9:49:21 AM6/4/14
to valenc...@googlegroups.com
Yep, Sean's general steps are good. There are some previous posts on this forum that also touch on various aspects of this topic:

Invalid token ("headless" API connection)

and

non-interactive webservice workflow
Reply all
Reply to author
Forward
0 new messages