Avalara Developer Network Developer communications

Chapter 1.2 - Authentication

Required Headers

Three pieces of information must appear in your request header:

Key Value
api_key Base64 "username:password"
client_id Unique identifier for your company. Avalara will provide this to you during account creation and your Client ID will be the same across all environments.
Content-Type application/json

Encode your API Key

To encode a plaintext string to Base64 in Windows Powershell, you can use the following script:
# Encode a string to Base64

[System.Convert]::ToBase64String(
  [System.Text.Encoding]::UTF8.GetBytes("first.last@avalara.com:secretpassword!"));
For example, if your username is first.last@avalara.com and your password is secretpassword!, your api_key would be Zmlyc3QubGFzdEBhdmFsYXJhLmNvbTpzZWNyZXRwYXNzd29yZCE=

Optional Headers

Our tax engine allows for additional customization when calculating taxes and we accomplish this through the creation of Client Profiles. We will discuss how Client Profiles work in more detail in the Customizing Transactions section. For now, just know that you have the ability to pass an additional header to specify a specific profile:
Key Value
client_profile_id An integer that specifies which profile you want to use when calculating the taxes in this request