You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ole Melhus edited this page Oct 11, 2017
·
6 revisions
Create a new token using the OAuth flow
vardev_client_id="...";vardev_secret="...";varredirect_url="http://localhost:44300/VismaNet/callback";varurl=VismaNet.GetOAuthUrl(dev_client_id,redirect_url);Console.WriteLine($"Open this URL in your browser: {url}");Console.Write("Paste code from URL: ");varcode=Console.ReadLine();vartoken=awaitVismaNet.GetTokenUsingOAuth(dev_client_id,dev_secret,code,redirect_url);varcontexts=awaitVismaNet.GetContextsForToken(token);foreach(varctxincontexts){Console.WriteLine($"{ctx.name}: {ctx.id}");}