Skip to main content
eBay Community logo
  • Home
  • News & Updates
  • Buying & Selling
    • Buying
    • Selling
    • New to selling on eBay
    • Seller Tools
    • Shipping
    • Returns
    • eBay Advertising
    • Payments
    • Mobile Apps
  • Explore Categories
      • eBay Motors
      • Electronics
      • Collectibles & Art
      • Home & Garden
      • Clothing, Shoes & Accessories
      • Toys & Hobbies
      • Sporting Goods
      • Books, Movies & Music
      • Health & Beauty
      • Business & Industrial
      • Jewelry & Watches
      • Specialty Services
      • eBay Partner Network
      • Accessibility
      • eBay Cafe
      • eBay Live
      • Community Mentors
      • APIs Feedback, Comments and Suggestions
      • Post Order APIs
      • RESTful Buy APIs
      • RESTful Sell APIs
      • Token, Messaging, Sandbox Related Issues
      • Traditional APIs
      • eBay APIs
    • Ask a Mentor
  • About
    • About the Community
    • Share Community Platform Feedback
    • Report eBay Technical Issues
    • About eBay
  • Community Events
    • Events
    • Seller Circle Hosts
    • Seller Circles
  • eBay Help
All PostsDiscussionsBlogsIdeasQuestions
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
Discussions
  • Special CategoriesChevronRightIcon
  • eBay Developers ProgramChevronRightIcon
  • RESTful Buy APIsChevronRightIcon
  • BrowseChevronRightIcon
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?

erqq9376
erqq9376
0View listings
Posted 3 years ago·Last reply 3 years ago
                                       
         
1 comment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
               
shipscript

shipscript

·3 years ago
111View listings

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

                                       
                                                                                 
  •                                                              
  •                                                              
  •