title: USPS : API Authorization failure
body: <p>Why won't the rate work with USPS? I'm using ratev4 and I get an error:</p>
  
  <p>Error:</p>
  
  <pre><code>API Authorization failure. RateV4 is not a valid API name for this protocol.
  UspsCom::DoAuth
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  $devurl = "testing.shippingapis.com/ShippingAPITest.dll";
  $puburl = "https://secure.shippingapis.com/ShippingAPITest.dll";
  
  $service = "RateV4";
  $userid = "690DEVBL1739";
  
  $xml = rawurlencode('&lt;RateV4Request USERID="xxxxx"&gt;
      &lt;Revision/&gt;
      &lt;Package ID="1ST"&gt;
          &lt;Service&gt;FIRST CLASS&lt;/Service&gt;
          &lt;FirstClassMailType&gt;LETTER&lt;/FirstClassMailType&gt;
          &lt;ZipOrigination&gt;44106&lt;/ZipOrigination&gt;
          &lt;ZipDestination&gt;20770&lt;/ZipDestination&gt;
          &lt;Pounds&gt;1&lt;/Pounds&gt;
          &lt;Ounces&gt;0.0&lt;/Ounces&gt; 
          &lt;Container/&gt;
          &lt;Size&gt;REGULAR&lt;/Size&gt; 
          &lt;Machinable&gt;true&lt;/Machinable&gt;
      &lt;/Package&gt;
      &lt;/RateV4Request&gt;');
  
      $request = $devurl . "?API=" . $service . "&amp;xml=" . $xml;
  
  
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $request);
      curl_setopt($ch, CURLOPT_HEADER, false);
      curl_setopt($ch, CURLOPT_HTTPGET, true);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
  
  
      $response = curl_exec($ch);
      curl_close($ch);
  
      echo "&lt;pre&gt;";
      print_r($response);
      echo "&lt;/pre&gt;";
  </code></pre>