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):
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