Git Product home page Git Product logo

Comments (8)

hakanensari avatar hakanensari commented on July 29, 2024

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.

stravas avatar stravas commented on July 29, 2024

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.

hakanensari avatar hakanensari commented on July 29, 2024

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.

stravas avatar stravas commented on July 29, 2024

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.

hakanensari avatar hakanensari commented on July 29, 2024

Yes. Is this the culprit?

from peddler.

stravas avatar stravas commented on July 29, 2024

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.

stravas avatar stravas commented on July 29, 2024

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.

hakanensari avatar hakanensari commented on July 29, 2024

👍

from peddler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.