简体   繁体   English

FEDEX API,身份验证失败

[英]FEDEX API, Authentication Failed

I am integrating FEDEX Tracking, Rate and Shipping API's into my application but i am stuck with an issue.我正在将 FEDEX Tracking、Rate 和 Shipping API 集成到我的应用程序中,但我遇到了一个问题。

When i run my code with Developer account details, everything runs correctly.当我使用开发人员帐户详细信息运行我的代码时,一切运行正常。 But when i run the same code with production keys, it gives me "Error Code 1000, Authentication Error"但是当我使用生产密钥运行相同的代码时,它给了我“错误代码 1000,身份验证错误”

I have updated all keys and also changed the URL to point to production URL " https://ws.fedex.com:443/web-services/ ".我已更新所有密钥,并将 URL 更改为指向生产 URL“ https://ws.fedex.com:443/web-services/ ”。

It doesn't seem to be a permission issue from FEDEX end as the standard services(Tracking) are enabled by default for production and that's also giving the same error "Error Code 1000, Authentication Error" .这似乎不是 FEDEX 端的权限问题,因为默认情况下为生产启用了标准服务(跟踪),这也给出了相同的错误“错误代码 1000,身份验证错误”

Below is the SOAP request and response XML.下面是 SOAP 请求和响应 XML。

REQUEST:要求:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<RateRequest xmlns="http://fedex.com/ws/rate/v14">
<WebAuthenticationDetail>
<UserCredential>
<Key>AAAAAAAA</Key>
<Password>BBBBBBBBB</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail>
<AccountNumber>CCCCCCCC</AccountNumber>
<MeterNumber>DDDDDDDD</MeterNumber>
</ClientDetail>
<TransactionDetail>
<CustomerTransactionId>java sample - Rate Request</CustomerTransactionId>
</TransactionDetail>
<Version>
<ServiceId>crs</ServiceId>
<Major>14</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<ReturnTransitAndCommit>true</ReturnTransitAndCommit>
<RequestedShipment>
<ShipTimestamp>2015-04-19T18:21:11.542+05:30</ShipTimestamp>
<DropoffType>REGULAR_PICKUP</DropoffType>
<ServiceType>FEDEX_GROUND</ServiceType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<TotalInsuredValue>
<Currency>USD</Currency>
</TotalInsuredValue>
<Shipper>
<Address>
<StreetLines>1310 Piper Dr</StreetLines>
<City>Milpitas</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>95035</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Shipper>
<Recipient>
<Address>
<StreetLines>3370 E. La Palma Avenue</StreetLines>
<City>Anaheim</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>92806</PostalCode>
<CountryCode>US</CountryCode>
<Residential>false</Residential>
</Address>
</Recipient>
<ShippingChargesPayment>
<PaymentType>SENDER</PaymentType>
<Payor>
<ResponsibleParty>
<AccountNumber>ACCOUNT_NUMBER_PRESENT</AccountNumber>
</ResponsibleParty>
</Payor>
</ShippingChargesPayment>
<RateRequestTypes>ACCOUNT</RateRequestTypes>
<PackageCount>1</PackageCount>
<RequestedPackageLineItems>
<GroupPackageCount>1</GroupPackageCount>
<InsuredValue>
<Currency>USD</Currency>
<Amount>100.00</Amount>
</InsuredValue>
<Weight>
<Units>LB</Units>
<Value>10</Value>
</Weight>
<Dimensions>
<Length>1</Length>
<Width>1</Width>
<Height>1</Height>
<Units>IN</Units>
</Dimensions>
<SpecialServicesRequested/>
</RequestedPackageLineItems>
</RequestedShipment>
</RateRequest>
</soap:Body>
</soap:Envelope>

RESPONSE:回复:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<v14:RateReply xmlns:v14="http://fedex.com/ws/rate/v14">
<v14:HighestSeverity>ERROR</v14:HighestSeverity>
<v14:Notifications>
<v14:Severity>ERROR</v14:Severity>
<v14:Source>prof</v14:Source>
<v14:Code>1000</v14:Code>
<v14:Message>Authentication Failed</v14:Message>
</v14:Notifications>
<v14:TransactionDetail>
<v14:CustomerTransactionId>java sample - Rate Request</v14:CustomerTransactionId>
</v14:TransactionDetail>
<v14:Version>
<v14:ServiceId>crs</v14:ServiceId>
<v14:Major>14</v14:Major>
<v14:Intermediate>0</v14:Intermediate>
<v14:Minor>0</v14:Minor>
</v14:Version>
</v14:RateReply>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Please help me resolve this issue :(请帮我解决这个问题:(

I faced this issue from last week and found solution finally after a discussion with FedEx Technical Person.See why we are facing such error all because of Developer Test Account we generated from developer website.One thing we should keep in mind that Test Account Number start with "6" is of Production & Key Start with "5" is Correct Test Key.So Please check your Test Key when you get Authentication problem with Error Code 1000.我从上周开始遇到这个问题,并在与 FedEx 技术人员讨论后终于找到了解决方案。看看为什么我们面临这样的错误都是因为我们从开发者网站生成的开发者测试帐户。我们应该记住的一件事是测试帐号开始“6”是生产和密钥开始,“5”是正确的测试密钥。因此,当您遇到错误代码 1000 的身份验证问题时,请检查您的测试密钥。

Revert me if this is not helpful.如果这没有帮助,请回复我。

https://www.xadapter.com/test-use-fedex-account-number-test-account-number-password-use/ https://www.xadapter.com/test-use-fedex-account-number-test-account-number-password-use/

User Account Password is different from password we have to supply in web service.用户帐户密码不同于我们必须在网络服务中提供的密码。 please check above link请检查上面的链接

If you're getting the error for all web services in production then you've got a key issue.如果您在生产中遇到所有 Web 服务的错​​误,那么您就遇到了一个关键问题。 Get new credentials from the developer area of FedEx or try emailing websupport at fedex.com从 FedEx 的开发人员区域获取新凭据或尝试在 fedex.com 上通过电子邮件发送网络支持

I struggled and so I called their support in US, which I'll say is excellent.我很挣扎,所以我打电话给他们在美国的支持,我会说这很棒。 I had a chance to speak to some developer who will observe your requests in real time and will inform you over call like what's causing this authentication issue.我有机会与一些开发人员交谈,他们会实时观察您的请求,并会通过电话通知您,例如导致此身份验证问题的原因。 Call here >> 1.877.339.2774在这里拨打 >> 1.877.339.2774

Now as per their support person, sometime while registering multiple times the earlier generated password gets overwritten with new, while key / account & meter numbers remain the same.现在,根据他们的支持人员的说法,有时在多次注册时,较早生成的密码会被新密码覆盖,而密钥/帐户和仪表号码保持不变。 (test & prod key passwords are sent over email you've registered with). (测试和生产密钥密码通过您注册的电子邮件发送)。

So if you're sure that you're using test/production credentials correctly mentioned in your code then you try re-registering for keys and must put your direct email address on the registration form.因此,如果您确定您使用的是代码中正确提及的测试/生产凭据,那么您可以尝试重新注册密钥,并且必须将您的直接电子邮件地址放在注册表单上。 The new password will help you get a success response from APIs.新密码将帮助您从 API 获得成功响应。

Also, if you're using api to track a shipment, then test creds will only help if you've supplied a test tracking number, same is for production keys.此外,如果您使用 api 来跟踪货件,那么只有在您提供了测试跟踪号的情况下,测试凭证才会有所帮助,生产密钥也是如此。 Prod keys will only work for real shipment tracking IDs Prod 密钥仅适用于真实的货件跟踪 ID

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM