question

phillyauctioneer2 avatar image
0 Likes"
phillyauctioneer2 asked ·

What am I missing in the GET request for Browse API?

Using JavaScript and I can't get the request correct. Below is my code (token removed) along with a screenshot of the error I get in the console. Can someone tell me what I'm missing, or what I'm doing wrong that is generating the error in the console?


const myInit = {

method: 'GET',

headers: {"Authorization": "Bearer OATH APPLICATION TOKEN HERE"},

mode: 'cors',

cache: 'default'

};


fetch('https://api.sandbox.com/buy/browse/v1/item_summary/search?q=drone&limit=3', myInit)

.then(response => response.json())

.then(data => console.log(data));


Screenshot attached

error_console2.JPG

browse apijavascriptget request
error-console2.jpg (47.3 KiB)
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.