Getting AuthenticationError on a request that works through the API directly
achadee opened this issue · 2 comments
achadee commented
if I use postman and send
{"address_from":{"name":"Avin Chadee","street1":"2 Plummer Rd. Mentone","city":"Melbourne","state":"Victoria","zip":"3194","country":"AU"},"address_to":{"name":"John Smith","street1":"111 Moreland Rd","city":"Coburg","state":"Victoria","zip":"3058","country":"AU"},"parcels":{"length":"12.0","width":"12.0","height":"12.0","distance_unit":"cm","weight":4,"mass_unit":"kg"},"async":false}
I get a valid response, however when I user the gem
x = {:address_from=>{"name"=>"Avin Chadee", "street1"=>"2 Plummer Rd. Mentone", "city"=>"Melbourne", "state"=>"Victoria", "zip"=>"3194", "country"=>"AU"}, :address_to=>{"name"=>"John Smith", "street1"=>"111 Moreland Rd", "city"=>"Coburg", "state"=>"Victoria", "zip"=>"3058", "country"=>"AU"}, :parcels=>{"length"=>0.12e2, "width"=>0.12e2, "height"=>0.12e2, "distance_unit"=>:cm, "weight"=>4, "mass_unit"=>:kg}, :async=>false}
shipment = Shippo::Shipment.create(x)
Shippo::Exceptions::AuthenticationError (Shippo::Exceptions::AuthenticationError (401 Unauthorized) )
jfriedr commented
Are you still running into this 401 with the client?