AvalaraAvalaraDeveloperDeveloper
  • Productsdown arrow
      Calculations
      AvaTax
      AvaTax Brazil
      AvaTax for Communications
      AvaTax for Excise
      Avalara Tax Content
      E-invoicing
      Activation Service
      Avalara E-Invoicing and Live Reporting
      Brazil
      Brazil Customer Portal
      Tax Compliance (Brazil)
      Tax Central
      Data Staging
      Returns
      Avalara Managed Returns API
      MyLodgeTax
      Avalara Returns Excise
      VAT Reporting
      Shared service
      Shared Services
      1099 & W-9
      Avalara 1099 & W-9
      Tax registrations and business licenses
      Avalara License Guidance
      Sales Tax Registrations
      Payroll tax registrations
      Avalara license filings
      ECM
      Exemption Certificate Management
      Avalara Cross-Border
      Automated Tariff Code Classification
      Self-Serve Tariff Code Classification
      Managed and Premium Tariff Code Classification
      AvaTax Cross-Border (Estimator + Calculator)
      Avalara Trade Compliance
      Avalara Trade and Tariff Library
  • Learndown arrow
      Integrations guides
      Refactor guides
      Get certified
  • Get starteddown arrow
      AvaTax 90 days free trial
      Playground
      Become a partner
      Build with Avalara using AI
  • Developdown arrow
      APIs
      SDKs
      MCPs
      Agent to Agent (A2A)
      AI use cases
      API versioning
  • Resourcesdown arrow
      Avalara NEXT recordings
      Avalara University
      Knowledge Center
  • Support
MENU
Search Icon

No results found for

Profile
  • Sign In
Sign In
Search Icon

No results found for

  • Productsdown arrow
      Calculations
      AvaTax
      AvaTax Brazil
      AvaTax for Communications
      AvaTax for Excise
      Avalara Tax Content
      E-invoicing
      Activation Service
      Avalara E-Invoicing and Live Reporting
      Brazil
      Brazil Customer Portal
      Tax Compliance (Brazil)
      Tax Central
      Data Staging
      Returns
      Avalara Managed Returns API
      MyLodgeTax
      Avalara Returns Excise
      VAT Reporting
      Shared service
      Shared Services
      1099 & W-9
      Avalara 1099 & W-9
      Tax registrations and business licenses
      Avalara License Guidance
      Sales Tax Registrations
      Payroll tax registrations
      Avalara license filings
      ECM
      Exemption Certificate Management
      Avalara Cross-Border
      Automated Tariff Code Classification
      Self-Serve Tariff Code Classification
      Managed and Premium Tariff Code Classification
      AvaTax Cross-Border (Estimator + Calculator)
      Avalara Trade Compliance
      Avalara Trade and Tariff Library
  • Learndown arrow
      Integrations guides
      Refactor guides
      Get certified
  • Get starteddown arrow
      AvaTax 90 days free trial
      Playground
      Become a partner
      Build with Avalara using AI
  • Developdown arrow
      APIs
      SDKs
      MCPs
      Agent to Agent (A2A)
      AI use cases
      API versioning
  • Resourcesdown arrow
      Avalara NEXT recordings
      Avalara University
      Knowledge Center
  • Support
Profile
  • Sign In
Sign In
Sales (877) 282-5585
cardImage
Getting Started with AvaTax
  • Connecting to the API
  • Authentication
  • Troubleshooting
  • Configure Your Account
  • Chapter Summary
cardImage
Transactions
  • A Simple Transaction
  • Invoice Lines
  • Should I commit?
  • Document Types
  • Duty Calc
  • Chapter Summary
cardImage
Customizing Your Transactions
  • Using Address Types
  • Using Reference Fields
  • Using TaxIncluded
  • Chapter Summary
cardImage
Reconciliation
  • Committing a Transaction
  • Modifying a Transaction
  • Chapter Summary
cardImage
Product Taxability
  • Finding a Tax Code
  • TaxCodes and Exemptions
  • Mapping Items to TaxCodes
  • Chapter Summary
cardImage
Discounts and Overrides
  • Tax Overrides
  • Discounting a Transaction
  • Chapter Summary
cardImage
Shipping and Handling
  • Taxability of Shipping Charges
  • Taxability of Handling Charges
  • Chapter Summary
cardImage
Exemptions
  • Reasons Tax Can Be Zero
  • Exemption Certificate
  • Exemptions for Usage
  • Chapter Summary
cardImage
Locations
  • About Location Based Reporting
  • Using Locations
  • Chapter Summary
cardImage
Consumer Use Tax
  • Consumer and Sellers Use Tax
  • Putting It All Together
  • Chapter Summary
cardImage
Calculating Tax Offline
  • Detecting a Dropped Connection
  • Retry or Fallback
  • Tax Content API
  • Reconcile Transactions After Outage
  • Chapter Summary
cardImage
Use Cases
  • Document Workflow
  • Calculating Tax
  • Address Validation
  • Reportable Transactions
  • Product Returns
  • Exempt Transactions
  • Voiding Documents
  • Drop Shipping
  • Consumer Use Tax
  • Batch File Reference
  • Automated Provisioning
  • SOAP or REST
  • Filtering in REST
  • Authentication in REST
  • Client Profile Headers
  • Finding Your CompanyId
  • Proxy Server Settings
  • Errors and Outages
  • REST Error Codes
  • SOAP Error Codes
  • Service Availability
  • Going Live
  • Logins and Resources
  • About Client Strings
Authentication in AvaTax REST v2

Authentication in AvaTax REST v2

The REST standard makes use of existing HTTP authentication methods rather than creating custom solutions. As a result, AvaTax V2, which uses the REST standard, supports Basic HTTP Authentication. This standard is well documented and has been in existence for a long time - which also means that over the past decades, many different people have implemented the standard in many different ways. Let’s describe exactly how to authenticate your API calls in AvaTax REST v2.

Additionally, we will talk a bit about the advantages and disadvantages of different types of authentication in order to help you select the correct type of authentication for your program.

Basic Authentication

The simplest type of authentication is called Basic HTTP Authentication, and it involves identifying yourself and providing a password. In order to use this API, you’ll need to know the following:

  • Your username, and
  • Your password.

That’s it! No magic. Here’s how to construct an authentication token for AvaTax REST v2 using your username and password:

Task Result
Start with the word "Basic" followed by username and password.
Basic username:password
Replace "username" with your username, and "password" with your password.
Basic bob@example.org:bobspasswordgoeshere
Now use your favorite Base64 encoding program to encode the right hand side of the string.
Basic Ym9iQGV4YW1wbGUub3JnOmJvYnNwYXNzd29yZGdvZXNoZXJl

Now you’re done! Just paste your authorization header into the swagger online UI tester, or attach the authorization header to an HTTP request.

Basic Authentication has a number of advantages and disadvantages:

  • Advantages
    • Allows user actions to be audited to the user who did them.
    • Allows different users to have different privilege levels.
    • Basic authentication does not expire.
    • All basic authentication headers are protected by strong SSL encryption in transit to Avalara.
    • All Avalara APIs support basic authentication.
  • Disadvantages
    • Usernames and passwords can be stolen by viruses or trojans on a user's PC.
    • Insecure passwords can be guessed by brute force. To prevent this, Avalara enforces a limit: if you fail to authenticate multiple times in a row, your account may be locked out.

Overall, basic authentication is recommended for individual users who are calling APIs within AvaTax, or for users who have limited access rights.

License Key Authentication

Each AvaTax account has one (and only one!) license key. This license key is generated by an account administrator on the AvaTax Website. Here’s how to generate a license key:

  • Log on to the AvaTax Website
  • Click on Settings
  • Click on Reset License Key

As you’ll notice, this page is restricted to only account administrators. Keep in mind that you only have one license key! When you generate a new license key, all older license keys are immediately revoked and no longer usable. This is helpful because if your license key is lost or stolen you can revoke it instantly; it is a risk though because this may affect existing systems that are running at the moment.

To authenticate using a license key, here’s how you construct your authorization header:

Task Result
Start with the word "Basic" followed by accountid and licensekey.
Basic accountid:licensekey
Replace "accountid" with your account ID number, and "licensekey" with the license key you generated above.
Basic 123456789:123456789ABCDEF123456789ABCDEF
Now use your favorite Base64 encoding program to encode the right hand side of the string.
Basic MTIzNDU2Nzg5OjEyMzQ1Njc4OUFCQ0RFRjEyMzQ1Njc4OUFCQ0RFRg==

As you’ll notice, license key and basic authentication are very similar in practice. Why would someone want to use license key authentication instead of username/password? Let’s look at the advantages and disadvantages of license key authentication.

  • Advantages
    • License keys have much stronger entropy when compared to a username/password, and are harder to attack.
    • Account ID / License Key authentication is not user-specific and will not expire if one user resets their password.
    • Basic authentication does not expire.
    • All basic authentication headers are protected by strong SSL encryption in transit to Avalara.
    • All Avalara APIs support basic authentication.
  • Disadvantages
    • There is only one license key for each company.
    • Revoking your license key will cause all API calls with the old license key to fail.
    • It is not possible to identify individual users taking an action when license key authentication is used.

I got an error message - what does it mean?

If you are working on authentication and you received an error message, here’s a breakdown of all REST v2 error codes and how to interpret them.

Recommendations

Overall, Avalara recommends:

  • If you are building a connector that customers will set up and use on their premises, use "Account ID/License Key" authentication.
  • Otherwise, use "Username/Password" authentication.
PreviousNext
Knowledge CenterDeveloper Support
Avalara.com|Terms of Use|Privacy Policy
© 2026 Avalara, Inc.