06-29-2023 03:55 AM
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?item_ids=v1|202117468662|0,v1|204363042981|0`,
{ headers }
);
console.log(response.data);
};
Response:
{
total: 0,
warnings: [
{
errorId: 11001,
domain: 'API_BROWSE',
category: 'REQUEST',
message: 'The specified item Id was not found.',
parameters: [Array]
},
{
errorId: 11001,
domain: 'API_BROWSE',
category: 'REQUEST',
message: 'The specified item Id was not found.',
parameters: [Array]
}
]
}
When I make a request to retrieve product data for ids, I get the following result. I've tried multiple id's but none of them work. I'm not even entirely sure if the numbers that i'm pasting in are correct id's at this point.
Any help is appreciated.
06-30-2023 12:12 AM
An Item ID refers to a listing. The Sandbox does not access items out on the production site. The Sandbox can only access items that are posted to the sandbox. If you have gotten through most of the handshaking issues, you might just try switching to the production endpoint to give it a try.
01-05-2025 06:10 AM
Works fine after I switched to Production. Thanks.