Skip to main content
Avalara Help Center

How do I resolve "An error occurred when verifying security for the message" in the AvaTax API?


You are getting "An error occurred when verifying security for the message" when you try to ping Avalara.


API Integration


  •  Use an acceptable security header, use the example below to build your security token:

<soapenv:Envelope xmlns:soapenv="" xmlns:ser="">
      <wsse:Security xmlns:wsse="">
         <wsse:UsernameToken wsu:Id="UsernameToken-7" xmlns:wsu="">
            <wsse:Password Type="">1AB2C3DEF45G6A78</wsse:Password>

  • Avalara's WSDLs use a standard WSS (Web Service Security) token to authenticate the account or user and are supported by most SOAP tools and SDKs. The security token is not actually defined in the WSDL and must be added as a custom SOAP header. We recommend using the version above as it provides more security options and is supported by most web service tools.

Note: Enter your own Avalara Account number and license key to replace the samples.

Next steps

For more information, see our API Integration documentation.