Skip to content

Instantly share code, notes, and snippets.

@neverendingqs
Created July 25, 2016 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neverendingqs/782e0691498c4d4f10340431bca31f46 to your computer and use it in GitHub Desktop.
Save neverendingqs/782e0691498c4d4f10340431bca31f46 to your computer and use it in GitHub Desktop.
D2LAppContextFactory appContextFactory = new D2LAppContextFactory();
ID2LAppContext appContext = appContextFactory.Create(appId, appKey);
UserContextProperties userContextProperties = new UserContextProperties() {
UserId = myUserId, // put your user ID here
UserKey = myUserKey, // put your user key here
Scheme = "https",
HostName = bsUrl,
Port = port
};
ID2LUserContext userContext = appContext.CreateUserContext( savedProps: userContextProperties );
Uri endpoint = userContext.CreateAuthenticatedUri(...);
// call endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment