# How do I get my Account ID and License Key?

Source: https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/snk5995203785238/

Guide: 1099 & W-9

# How do I get my Account ID and License Key?

Learn how to retrieve your Account ID and License Key, whether you have access to the Avalara Portal or not.

This depends on whether you have access to the Avalara Portal:

-   If you have portal access (for example, use AvaTax or CertCapture):

    1.  Sign in to the [Avalara Portal](https://www.avalara.com/us/en/signin.html).

    2.  Go to Settings > License and API Keys.

    3.  Select Generate New Key (this invalidates any existing key).

    4.  Your **Account ID** is shown under the Account menu.

-   If you don’t have portal access:

    1.  Contact Avalara 1099 Customer Support to request API activation.

    2.  The Account Owner will receive an email to set up their credentials.

    3.  Activate your account and accept the Terms via:

        ```
        curl -X POST \
          'https://rest.avatax.com/api/v2/accounts/{accountId}/activate' \
          -H 'authorization: Basic {base64Encoded(email:password)}' \
          -d '{ "acceptAvalaraTermsAndConditions": true, "haveReadAvalaraTermsAndConditions": true }'
        ```

    4.  Retrieve your account information and license key using the API.

        ```
        curl -X GET \
         'https://rest.avatax.com/api/v2/accounts' \
         -H 'accept: application/json' \
         -H 'authorization: Basic {base64Encoded(email:password)}'
        ```

    5.  ```
        curl -X POST \
          'https://rest.avatax.com/api/v2/accounts/{accountId}/licensekey' \
          -H 'accept: application/json' \
          -H 'authorization: Basic {base64Encoded(email:password)}' \
          -H 'Content-Type: application/json-patch+json' \
          -d '{
            "name": "{{licenseKeyName}}",
            "accountId": "{{accountId}}"
          }'
        ```

    6.  Use these credentials to request a bearer token as shown above.