magento2 – Magento 2 USPS throws error on frontend


I have a Magento 2.3.4 site running. UPS Shipping calculates shipping costs correctly on front-end checkout, however, USPS returns an error. I have set debug to “on” and the error logs say that my user name and password are incorrect but this is not the case. I can log into usps.com fine with these creds and they also worked on on my old Magento 1.9.3 site.

I’ve found this question posted online in various places but haven’t found an answer other than review the logs. But these are inconclusive so far.

Does anyone know any tips to get this working? My customers used USPS 9/10 on my Mage1.9 site so Id like to get it running.

Below is the latest entry to the shipping error log.

(2020-06-02 01:04:54) main.ERROR: '401 Unauthorized' () ()
(2020-06-02 01:04:54) main.DEBUG: array (
  'request' => '<?xml version="1.0" encoding="UTF-8"?>
<RateV4Request USERID="****"><Revision>2</Revision><Package ID="0"><Service>ALL</Service><ZipOrigination>94707</ZipOrigination><ZipDestination>94544</ZipDestination><Pounds>2</Pounds><Ounces>0.0000000000</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>true</Machinable></Package></RateV4Request>
',
  'result' => '<?xml version="1.0" encoding="UTF-8"?>
<Error><Number>80040B1A</Number><Description>Authorization failure.  Perhaps username and/or password is incorrect.</Description><Source>USPSCOM::DoAuth</Source></Error>',
) () ()
(2020-06-02 01:14:03) main.ERROR: '401 Unauthorized' () ()
(2020-06-02 01:14:03) main.DEBUG: array (
  'request' => '<?xml version="1.0" encoding="UTF-8"?>
<RateV4Request USERID="****"><Revision>2</Revision><Package ID="0"><Service>ALL</Service><ZipOrigination>94707</ZipOrigination><ZipDestination>94544</ZipDestination><Pounds>2</Pounds><Ounces>0.0000000000</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>true</Machinable></Package></RateV4Request>
',
  'result' => '<?xml version="1.0" encoding="UTF-8"?>
<Error><Number>80040B1A</Number><Description>Authorization failure.  Perhaps username and/or password is incorrect.</Description><Source>USPSCOM::DoAuth</Source></Error>',
) () ()
(2020-06-02 01:14:57) main.ERROR: '401 Unauthorized' () ()
(2020-06-02 01:14:57) main.DEBUG: array (
  'request' => '<?xml version="1.0" encoding="UTF-8"?>
<RateV4Request USERID="****"><Revision>2</Revision><Package ID="0"><Service>Priority</Service><ZipOrigination>94707</ZipOrigination><ZipDestination>94544</ZipDestination><Pounds>2</Pounds><Ounces>0.0000000000</Ounces><Container>PADDED FLAT RATE ENVELOPE</Container><Size>REGULAR</Size><Machinable>true</Machinable></Package></RateV4Request>
',
  'result' => '<?xml version="1.0" encoding="UTF-8"?>
<Error><Number>80040B1A</Number><Description>Authorization failure.  Perhaps username and/or password is incorrect.</Description><Source>USPSCOM::DoAuth</Source></Error>',
) () ()
(2020-06-02 01:16:43) main.ERROR: '401 Unauthorized' () ()
(2020-06-02 01:16:43) main.DEBUG: array (
  'request' => '<?xml version="1.0" encoding="UTF-8"?>
<RateV4Request USERID="****"><Revision>2</Revision><Package ID="0"><Service>ALL</Service><ZipOrigination>94707</ZipOrigination><ZipDestination>94544</ZipDestination><Pounds>2</Pounds><Ounces>0.0000000000</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>false</Machinable></Package></RateV4Request>
',
  'result' => '<?xml version="1.0" encoding="UTF-8"?>
<Error><Number>80040B1A</Number><Description>Authorization failure.  Perhaps username and/or password is incorrect.</Description><Source>USPSCOM::DoAuth</Source></Error>',
) () ()

Thanks

Here is a screenshot of my backend confs