/// <summary> /// Get the OAuth tokens required to access the cloud based API (Delegate) /// </summary> /// <param name="code">The code received after the user has given the application permission to access their company files</param> /// <param name="onComplete">The action to call when the operation is complete</param> /// <param name="onError">The action to call when the operation has an error</param> public void GetTokens(string code, Action<HttpStatusCode, OAuthTokens> onComplete, Action<Uri, Exception> onError) { var handler = new OAuthRequestHandler(_configuration); var request = this.Factory.Create(OAuthRequestHandler.OAuthRequestUri); handler.GetOAuthTokens(request, code, onComplete, onError); }