question

Portfolio avatar image
Portfolio asked

AWS API shown "Access token is missing in the request header."

I have try to test the API (https://sellingpartnerapi-na.amazon.com/authorization/v1/authorizationCode) by postman. Although I have input the params and authorization with AWS signature, the message "Access token is missing in the request header." is shown. what are the fields do I need to put in the header tab?

header-error.jpg

P.S. The Session Token field is empty now, do I need to assign it and how to find it?





apiaws
header-error.jpg (28.5 KiB)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sihbha avatar image
sihbha answered

I was just having the same issue, but it looks like when Ruby passes headers to Net::HTTPHeader and it transforms them with a capitalize method that amazon's API doesn't like. Adding the following hack made it work for me in ruby, which helps keep the header names lowercase:

module Net::HTTPHeader
  def capitalize(name)
    name
  end
  private :capitalize
end

Hope this helps!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.