Hello, I’m trying to access the API using fetch in javascript but keep getting “TypeError: Failed to fetch”, I’m having a hard time figuring out how to do this with the documentation. Can anyone provide me any resources or info on this?
fetch("https://api.typeform.com/forms/{form_id}/responses", {
method: 'GET',
headers: {
'X-API-KEY': '{My secret key here}'
}})
.then(res => res.json())
.then(data => console.log(data))
.catch(error => console.error(error));