# Chapter 1.2 - Authentication

Source: https://developer.avalara.com/products/communications/integration-guides/dev-guide_rest_v2/getting-started/authentication/

-   [Previous](/communications/dev-guide_rest_v2/getting-started/account-creation/)
-   [Next](/communications/dev-guide_rest_v2/getting-started/environments-endpoints/)

AvaTax for Communications REST v2 supports basic access authentication. Use a [Base64 encoded username:password](#encode) to authenticate.

### Required Headers

These items must appear in your request header:

Key

Value

`Authorization`

Basic "{encoded username:password}"

`client_id`

Unique identifier for your company. Avalara provides this during [account creation](/communications/dev-guide_rest_v2/getting-started/account-creation/). Your Client ID is the same across all environments.

`Content-Type`

`application/json`

### Encode your Username and Password

Your Customer Portal "{encoded username:password}" is encoded in Base64. For example, if your username is `first.last@avalara.com` and your password is `secretpassword!`, use `Zmlyc3QubGFzdEBhdmFsYXJhLmNvbTpzZWNyZXRwYXNzd29yZCE=` for basic authentication.  

You can encode a plaintext string to Base64 in **Windows Powershell** using the following script:  

```powershell
# Encode a string to Base64[System.Convert]::ToBase64String( [System.Text.Encoding]::UTF8.GetBytes("first.last@avalara.com:secretpassword!"));
```

#### Note

Different factors can impact your "{encoded username:password}", namely different username capitalization. Usernames are not case sensitive, but passwords are. Base64 encoded values for usernames `first.last@avalara.com` and `First.Last@avalara.com` are different but are treated as being identical behind the scenes during authentication. Base64 encoded values for passwords `secretpassword!` and `SecretPassword!` are different and cause authentication to fail because the password is not what is expected.  

### Optional Headers

Our tax engine allows for additional customization when calculating taxes through **client profiles**. For details about how client profiles work, see [Customizing Transactions](/communications/dev-guide_rest_v2/customizing-transactions/). For now, just know that you can pass an additional header to use 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

#### Note

If a `client_profile_id` is left blank, REST v2 uses the System Default configuration.  

-   [Previous](/communications/dev-guide_rest_v2/getting-started/account-creation/)
-   [Next](/communications/dev-guide_rest_v2/getting-started/environments-endpoints/)