Skip to main content
Avalara Help Center

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

Overview

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

Environment

API Integration

Resolution

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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://avatax.avalara.com/services">
   <soapenv:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/...secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-7" xmlns:wsu="http://docs.oasis-open.org/wss/2004/...tility-1.0.xsd">
            <wsse:Username>110001234</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/...0#PasswordText">1AB2C3DEF45G6A78</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
      <ser:Profile>
         <ser:Name>1.0</ser:Name>
         <ser:Client>MyAdaptorName</ser:Client>
         <ser:Adapter>Adaptor</ser:Adapter>
         <ser:Machine>MyServer</ser:Machine>
      </ser:Profile>
   </soapenv:Header>
   <soapenv:Body>
      <ser:Ping>
         <ser:Message/>
      </ser:Ping>
   </soapenv:Body>
</soapenv:Envelope>

  • 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.