//[Fact] public void GenerateAuthTokenWithUsernameAndPassword() { //insert your username and password here const string username = ""; const string password = ""; var client = new HipchatClient("YourToken"); var token = client.GenerateToken(GrantType.Password, Enumerable.Empty <TokenScope>(), username, password: password); Assert.NotNull(token); }
public void GenerateTokenExample() { var client = new HipchatClient(); var token = client.GenerateToken(GrantType.ClientCredentials, new List <TokenScope> { TokenScope.SendNotification, }, "", /*Auth Id*/ "" /*Auth Secret*/); Assert.NotNull(token); }
//[Fact] public void GenerateAuthToken() { //insert your authId and auth Secret here const string authId = ""; const string authSecret = ""; var client = new HipchatClient(); var token = client.GenerateToken(GrantType.ClientCredentials, new List <TokenScope> { TokenScope.SendNotification }, authId, authSecret); Assert.NotNull(token); }