Hello everyone,
despite many attempts, I can’t switch my AMAZON product API curl to http request, I always get a 400 error.
Could you help me transform my Curl request into HTTP request please thanking you in advance
below is my Curl :
curl "https://webservices.amazon.fr/paapi5/getitems" \
-H "[Host: webservices.amazon.fr](https://)" \
-H "Accept: application/json, text/javascript" \
-H "Accept-Language: en-US" \
-H "Content-Type: application/json; charset=UTF-8" \
-H "X-Amz-Date: 20220202T062956Z" \
-H "X-Amz-Target: com.amazon.paapi5.v1.ProductAdvertisingAPIv1.GetItems" \
-H "Content-Encoding: amz-1.0" \
-H "Authorization: AWS4-HMAC-SHA256 Credential=AKIAIGNHKA374NIEG5GA/20220202/eu-west-1/ProductAdvertisingAPI/aws4_request SignedHeaders=content-encoding;host;x-amz-date;x-amz-target Signature=731ddb17873fdc9ac897ccacafc4379d0504a43a6702cc549af64d22aa5dac8c" \
-d "{
\"ItemIds\": [
\"B087YKWBWC\"
],
\"Resources\": [
\"Images.Primary.Large\",
\"ItemInfo.Title\"
],
\"PartnerTag\": \"galaxiegeek-21\",
\"PartnerType\": \"Associates\",
\"Marketplace\": \"www.amazon.fr\"
}"
below is my node:
{
"name": "api amazon",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-400,
60
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "https://webservices.amazon.fr/paapi5/getitems",
"allowUnauthorizedCerts": true,
"jsonParameters": true,
"options": {
"bodyContentType": "raw",
"bodyContentCustomMimeType": "application/json"
},
"bodyParametersJson": "={{JSON.parse('{\"ItemType\\\":\\\"ASIN\\\",\\\"ItemIds\\\":\\\"B09KKN5PLC\\\",\\\"Resources\\\": \\\"Images.Primary.Large\\\",\\\"PartnerTag\\\":\\\"galaxiegeek-21\\\",\\\"PartnerType\\\":\\\"Associates\\\",\\\"Marketplace\\\":\\\"www.amazon.fr\\\"}')}}",
"headerParametersJson": "={{JSON.parse('{\"Host\\\":\\\"webservices.amazon.fr\\\",\\\"Accept\\\":\\\"application/json, text/javascript\\\",\\\"Accept-Language\\\":\\\"en-US\\\",\\\"Content-Type\\\":\\\"application/json; charset=UTF-8\\\",\\\"X-Amz-Date\\\":\\\"20220202T052528Z\\\",\\\"X-Amz-Target\\\":\\\"com.amazon.paapi5.v1.ProductAdvertisingAPIv1.GetItems\\\",\\\"Content-Encoding\\\":\\\"amz-1.0\\\",\\\"kms\\\":\\\"CreateGrant\\\",\\\"Authorization\\\":\\\"AWS4-HMAC-SHA256 Credential=AKIAIGNHKA374NIEG5GA/20220202/eu-west-1/ProductAdvertisingAPI/aws4_request SignedHeaders=content-encoding;host;x-amz-date;x-amz-target Signature=84228fe833ec5eae13466b9a0c3c9b81eae7660acb732b801e3bf86bb9566419\\\"}')}}"
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-220,
60
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"timezone": "Indian/Reunion",
"executionTimeout": -1,
"errorWorkflow": "3"
},
"id": 3
}`
thanking you in advance
Running n8n via desktop app