Petros Belachew
Petros Belachew

Reputation: 37

Ebay API call via JS on Zapier doesn't work

Error of the codeI have the following Ebay API call that has successfully worked on Postman https://svcs.sandbox.ebay.com/services/search/FindingService/v1?Operation-Name=findItemsByKeywords&Service-Version=1.0.0&Security-AppName=PetrosBe-Sells-SBX-9ac2147f3-b674cf2c&Response-Data-Format=JSON&REST-Payload&keywords=laptop

While using the following Fetch JS code on Zapier,I got an error

const newOptions = {
    //...options,
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `My Auth ID`,
    },
}
const res = await fetch('https://svcs.sandbox.ebay.com/services/search/FindingService/v1?Operation-Name=findItemsByKeywords&Service-Version=1.0.0&Security-AppName=xxx&Response-Data-Format=JSON&REST-Payload&keywords=laptop', newOptions);
const json = await res.json();
return json;

I have tried troubleshooting via Zapier, and tested on Postman and it is working. I expect the code to execute the API to search with sandbox account for specific keyword.

I need someone to help me identify the issue.

Upvotes: 0

Views: 48

Answers (0)

Related Questions