Comments (8)
Odd. The only change I can think of is adding Version
to the request parameters here and here.
Could you please rescue and check the response body?
begin
client.submit_feed #some args
rescue => e
puts e.response.body
end
from peddler.
ok i'm not this deep in ruby to see the mistake in the code. Here is the response:
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidRequest</Code>
<Message>parameter MWSAuthToken failed a validation check: value cannot be empty</Message>
<Detail/>
</Error>
<RequestID>ce914bb0-b4ce-416e-9414-e914752d8e6c</RequestID>
</ErrorResponse>
from peddler.
I'm assuming the credentials belong to a seller who's using your app? You now need to provide an MWSAuthToken
for them with the request.
The older Peddler version should fail as well. I have no idea why if it indeed is not.
from peddler.
is this what you mean?
If you are creating a client for another seller, pass the latter's MWSAuthToken to the client.
client.auth_token = "corge"
from peddler.
Yes. Is this the culprit?
from peddler.
what do I have to write in there instead of "corge"?
I thought I should get the auth_token from seller with client.get_auth_token but this only give me another bad request(400).
The message look like this
<?xml version=\"1.0\"?>
<ErrorResponse xmlns=\"https://mws.amazonservices.com/Sellers/2011-07-01\">
<Error>
<Type>Sender</Type>
<Code>InvalidParameterValue</Code>
<Message>Cannot request MWSAuthToken for own account</Message>
</Error>
<RequestId>109606f4-9f73-4c92-8afb-b1aac4b6b759</RequestId>
</ErrorResponse>
and how should the inkove look like after that? maybe like this?
client.auth_token.submit_feed(latin_1_string, '_POST_FLAT_FILE_LISTINGS_DATA_').parse
from peddler.
I've got it !!!
auth_thoken was the culprit. Just before you use the client you have to do this:
client.auth_token = "something"
client.submit_feed(latin_1_string, '_POST_FLAT_FILE_LISTINGS_DATA_').parse
Thanks a lot
PS: I appreciate you work hakanensari. This code saved me very much time in the fight with Amazon MWS.
from peddler.
👍
from peddler.
Related Issues (20)
- Unknown error due to failure in parsing HOT 1
- undefined method `key?' for nil:NilClass HOT 5
- Invoice generation and upload HOT 13
- `get_feed_submission_result` returns nil HOT 3
- Broken See Also docs links HOT 2
- MWS get_report encoding issues not UTF-8 but UTF8 HOT 2
- InvalidMarketplace error from Amazon turns into a parse error HOT 4
- ArgumentError: unknown encoding name - utf8 for chinese header HOT 9
- Error: Value null at 'marketplaceId' failed to satisfy constraint: Member must not be null) HOT 2
- Missing required parameter SellerId when calling list_order_items
- 'Access to Orders.ListOrders is denied' HOT 8
- Report 'GET_XML_BROWSE_TREE_DATA' - Parser - XML - Nil HOT 1
- File permissions issue in peddler 2.4.2 HOT 2
- RequestThrottled response is not raising as expected HOT 4
- Release SE marketplace support
- Migration to Selling Partner API? HOT 19
- Did you know the Peddler docs aren't there anymore? HOT 3
- Version 2.4.4 in rubygems does not have Poland Marketplace ID
- Peddler::Errors::AccessDenied Exception: Access to Orders.ListOrders is denied HOT 1
- Encoding of responses is not handled correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peddler.