cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Request for getItem returns data with empty string

I'm trying to retrieve product information, the request is a success but the data response is just an empty string. 

My code:

const fetchEbayProduct = async function (id, access_token) {
  const headers = {
    "X-EBAY-C-ENDUSERCTX": "contextualLocation=country%3DUS%2Czip%3D19406",
    // "X-EBAY-API-IAF-TOKEN": access_token,
    Authorization: `bearer ${access_token}`,
    "X-EBAY-API-VERSION": "967",
  };

  const response = await axios.get(
    `https://api.sandbox.ebay.com/buy/browse/v1/item/v2|385681562186`,
    { headers }
  );
  console.log("Product INFO:", response.data);
};

 

Response: 

Screenshot 2023-06-28 at 16.57.48.png

What am I doing wrong?

Message 1 of 2
latest reply
1 REPLY 1

Request for getItem returns data with empty string

The sandbox can not access Item IDs on the core site. Sandbox can only access items listed in the sandbox.

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 2 of 2
latest reply