3

I'm implementing aсtive_shipping plugin functionality in my app. I've got test account from fedex and trying to get some shipping rates as shown in plugin's readme at github:

fedex = FedEx.new(:login => '***', :password => '***', :key => '***', 
:account => '510087569', :meter => '100054531')
response = fedex.find_rates(origin, destination, packages)

This request causes an error: ActiveMerchant::Shipping::ResponseError (ERROR - 1000: Authentication Failed)

Also I'm confused with all that APIs keys (DHL, UPS etc). Can I use same account keys in different apps for each of carriers or should I make new ones for every app?

starball
  • 20,030
  • 7
  • 43
  • 238
sunki
  • 672
  • 11
  • 20

2 Answers2

6

You should pass :test => true in with your other options to let it know to use the test URL rather than the production URL.

You can see all the options and details here

https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/shipping/carriers/fedex.rb

In particular, make sure your other options are these:

# :key is your developer API key
# :password is your API password
# :account is your FedEx account number
# :login is your meter number
John Douthat
  • 40,711
  • 10
  • 69
  • 66
  • Interesting, but didn't help. Where did you take that option (I don't see it at aсtive_shipping's page on github)? – sunki Apr 26 '11 at 22:26
  • 1
    I'm really sorry but I've used my "user" password instead of "test account" one. So I added `:test => true` to the options and get now `ERROR - 803: Meter number is missing or invalid`. I checked it few times with provided by Fedex "meter" number in their email. – sunki Apr 26 '11 at 22:47
  • 1
    make sure you look at the most RECENT email. If you forget your key (because it's only on the CONFIRMATION PAGE - and not in the email) you have to go through the process again -- they send you a new email with the same information with the exception of the password, the password is NEW so make sure to update that!! I just spend an hour trying to use the old password (sigh) – Peege151 May 22 '14 at 17:58
  • I NEEDED TO USE TEST PASSWORD – Nate Flink Oct 17 '17 at 19:59
0

How to get key, password, meter number, account number

here some step to follow,

first get login to www.fedex.com/developer, once get login select Fedex **web services for

shipping** then select Develope & Test Your application then click on Obtain test key then

you will get one form fill that form and accept the agreement after submitting form you will

get email from Fedex which consist of all this information.

Please note that login is your meter number

Harshal_m_joshi
  • 1,489
  • 1
  • 16
  • 27