Is there a reason why my app would be returning a 401 Unauthorized response if the access_token is what I have on my. developer console on Ebay?const getToken = async () => { const token = await ebayAuthToken.getApplicationToken(prod); return token && JSON.parse(token) } const getEbayData = async () => { try { const token = await getToken(); console.log(token, 'TGOKEY') const res = await axios.get('https://api.ebay.com/buy/browse/v1/item_summary/search', { headers: { 'Authorization': `Bearer ${token && token.access_token}` }, params: { category_ids: 108765, q: 'Beatles', limit: 10 } }); console.log(res, 'RESPONSE'); } catch (err) { console.log(err) } } getEbayData()
Submitted October 01, 2020 at 12:40AM by NoCall2
No comments:
Post a Comment