/// <summary> /// Requests the token and secret for the user that logged in /// </summary> public UserToken RequestUserToken() { if (!AppAuthorized) { throw (new PhotobucketApiException("App Not Authorized")); } string userTokenUrl = OAuth.GenerateURL(_apiUrl, _userTokenUrl, _userTokenMethod, _consumerToken); ResponseMessage userTokenResponseMessage = GetResponseMessageFromUrl(userTokenUrl, _userTokenMethod); _userToken = OAuth.GetUserTokenFromResponse(userTokenResponseMessage.ResponseString); _userLoggedOn = true; _appAuthorized = false; _consumerToken = null; _currentUser = new User(_userToken.Username); return(_userToken); }