Skip to content

Instantly share code, notes, and snippets.

@DeeJayTC
Last active February 15, 2019 17:04
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 DeeJayTC/87f0e8c034699e9342b38a0650d31550 to your computer and use it in GitHub Desktop.
Save DeeJayTC/87f0e8c034699e9342b38a0650d31550 to your computer and use it in GitHub Desktop.
using Teamwork;
using Teamwork.Shared;
using Teamwork.Shared.Common;
private async Task<Teamwork.Client> HandleOauthAuthentication(string code, string state)
{
var response = await LoginFlow.TeamworkLoginFlow.GetLoginDataAsync(code);
// Use response to initialize a new instance of the Teamwork APi Client
return Client.GetTeamworkClient(
pDomain: response.AccountData.Account.URL,
pApiKey: response.TokenData.AccessToken,
pUseOauth: true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment