Last active
February 15, 2019 17:04
-
-
Save DeeJayTC/87f0e8c034699e9342b38a0650d31550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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