Learn how to authenticate your requests using BELLATRIX API library.


public class AuthenticationTests : APITest
    public void GetAlbumById()
        var request = new RestRequest("api/Albums/10");

        var client = App.GetApiClientService();

        var response = client.Get<Albums>(request);

        Assert.AreEqual(10, response.Data.AlbumId);


BELLATRIX provides an easy way to authenticate through the usage of few attributes.


We use JwtToken authentication. The attribute accepts your text tocken. Other authentication strategy attributes:

  • HttpBasicAuthenticationStrategy - user and password.
  • NtlmAuthenticationStrategy - authenticate with the credentials of the currently logged in user, or impersonate a user.
  • OAuth2AuthorizationRequestHeaderAuthenticationStrategy - OAuth 2 authenticator using the authorization request header field.
  • OAuth2UriQueryParameterAuthenticationStrategy - OAuth 2 authenticator using URI query parameter.
  • SimpleAuthenticationStrategy - userKey, user, passwordKey, password.