question

Max avatar image
Max asked

AWS SDK JS V3 for Seller data

Im trying to get access to SP-API to develop a private app using Amazon marketplace data. I'm registered as a developer and have an AWS account, registered the app and have all the necessary info to swap a refresh token for an access one and make calls to the API, however I am new to development and I am stuck with calling the LWA api and then generating a signature with the AWS SDK. The documentation for the final steps is here: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-selling-partner-api .

Firstly my LWA token swap call looks like this (IDs removed):

const token = await axios ({ method : 'post' ,
url : 'https://api.amazon.com/auth/o2/token' ,
headers : {
grant_type : 'refresh_token' ,
refresh_token : '' ,
client_id : '' ,
client_secret : '' }

which throws an invalid request error - I'm not sure why (I have tried from Postman also).

I have then tried to get my head around the AWS SDK signature generation but am stuck as the instructions seem to be written in Java or miss out info on where documentation of the necessary modules are/named.


Any help with either of these would be appreciated!

Thanks

login with amazonawsask sdk
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

Mike@Amazon avatar image
Mike@Amazon answered

Hi Max,

Thank you for posting in the Amazon Developer forums.

For questions about Marketplace Web Services, please use the Amazon Services Seller Forums: https://sellercentral.amazon.com/forums/c/amazon-marketplace-web-service-mws/marketplace-web-service-amazon-mws-questions

You can also contact Amazon Selling Partner Support: https://sellercentral.amazon.com/gp/contact-us/contact-amazon-form.html

Thanks,
Mike

10 |5000

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