I am attempting to get a successful response from the AMZ SP-API. Below is my current 400 response.
I believe the issue is with the headers. The docs here don't really state what the header contents needs to be.
When I use the SaleWeaver package here, I am able to successfully make calls using my AWS and Seller credentials, so I know these work...
FWIW, I am using my 'Merchant Token' as the 'sellerID' PATH value.
import requests
import json
headers = {
'x-amz-access-token': access,
'client_id': clientid,
'client_secret':secret,
'x-amz-date' : '20220402'
}
payload = {'marketplaceId':'ATVPDKIKX0DER'}
sellerId = merch_token
sku = sku
response = requests.get(
f'https://sellingpartnerapi-na.amazon.com/listings/2021-08-01/items/{sellerId}/{sku}',
headers = headers,
params = payload
)
print(response.text)
response:
{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "MissingAuthenticationToken"
}
]
}