使用Ebay API我在向createUploadJob
发送POST时收到500错误。
我想为Bulk Data Exchange API创建UploadJob
,但每次收到“Net :: HTTPInternalServerError 500 Internal Server Error readbody = true”时。我正在使用Ruby on Rails将此xml-requests feed发送到ebay:
< ? xml version="1.0" encoding="utf-8"?>
< createUploadJobRequest xmlns="http://www.ebay.com/marketplace/services">
< uploadJobType> "AddFixedPriceItem" < /uploadJobType>
< UUID> "ebay-upload-123456"< /UUID>
< /createUploadJobRequest>
以下是标题(此处为哈希值,但稍后会将其添加到标题中):
"X-EBAY-SOA-OPERATION-NAME" => "createUploadJob",
"X-EBAY-SOA-SERVICE-NAME" => "BulkDataExchangeService",
"X-EBAY-SOA-SECURITY-TOKEN" => AUTH_TOKEN,
我正在使用这个ebay端点:
"https://webservices.ebay.com/BulkDataExchangeService"
我的NET::HTTP
版本:
req = Net::HTTP::Post.new( [uri.path, uri.query].join('?') )
req.body = content if verb == POST and !content.nil?
if (!headers.nil?)
headers.each do | key, value |
req[key] = value
end
else
logger.debug "HEADER Empty!"
end
http.request(req)
该方案为https
,方法为POST
。 Trading API的getItem-Fkt
有效,但对于lms,我收到上述错误。
- &GT;我在错误记录器中找到了一些有趣的回复... 我不明白为什么,在Trading API中,也许我必须将它编码为utf-8? ...
[05.08.2015 17:49:00]:<?xml version='1.0' encoding='UTF-8'?><errorMessage xmlns="http://www.ebay.com/marketplace/services"><error>
<errorId>11002</errorId><domain>Security</domain><severity>Error</severity>
<category>System</category><message>Authentication failed : The token does not exist, the user must complete the Auth & Auth sign in process to generate token.</message>
<subdomain>Authentication</subdomain><parameter name="Param1">The token does not exist, the user must complete the Auth & Auth sign in process to generate token.</parameter></error></errorMessage>
答案 0 :(得分:0)
developer.ebay.com的板条箱Auth'n'Auth令牌我认为您正在为LMS服务使用OAuth(新安全性),这对您没有帮助。