06-28-2023 07:58 AM
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:
What am I doing wrong?
06-30-2023 12:38 AM
The sandbox can not access Item IDs on the core site. Sandbox can only access items listed in the sandbox.