python-fedex-devs / python-fedex

A light wrapper around FedEx's SOAP API.
http://python-fedex.readthedocs.org
BSD 3-Clause "New" or "Revised" License
156 stars 139 forks source link

Authentication Failed using use_test_server=True #162

Closed randyhao-us closed 1 year ago

randyhao-us commented 2 years ago

Hello, hope it is not too silly to ask this question -

I got the "Authentication Failed" when I run this FedexAddressValidationRequest module with the setting of "use_test_server=True" in FedexConfig, along with Test Key and Secret.

I don't think it is Key and Secret issue as I'm able to use the same Key and Secret to get token by calling against test server https://apis-sandbox.fedex.com/oauth/token (see https://developer.fedex.com/api/en-us/catalog/authorization/v1/docs.html),

So what do I need to do to run FedexAddressValidationRequest against test sever?

================================================== FedexError Traceback (most recent call last)

in 9 avs_request.add_address(address1) 10 ---> 11 avs_request.send_request() ~\anaconda3\lib\site-packages\fedex\base_service.py in send_request(self, send_function) 329 # Check the response for errors specific to the particular request. 330 # This method can be overridden by a method on the child class object. --> 331 self._check_response_for_request_errors() 332 333 # Check the response for errors specific to the particular request. ~\anaconda3\lib\site-packages\fedex\base_service.py in _check_response_for_request_errors(self) 262 for notification in self.response.Notifications: 263 if notification.Severity == "ERROR": --> 264 raise FedexError(notification.Code, 265 notification.Message) 266 FedexError: Authentication Failed (Error code: 1000)
radzhome commented 1 year ago

did you try googling it? its clear - This error is displayed by FedEx only when you’re not authorized to print the shipping label. To get the right FedEx credentials, you will have to contact FedEx or fill up and submit an online form.