Hi There,
I want to test using FuzzySearch and Autocomplete on my company’s website, to allow users to search for an address and then prepopulate the found/selected address, into form field inputs. I’ve basically lifted the code from the “Search with autocomplete” example:
However, this API end point is being blocked, when I try to make a GET request: - https://api.tomtom.com/search
And I get the following error:
fetch blocked by privacy-gateway
Do you know why this might be? Here’s the fetch I’m making:
fetch("https://api.tomtom.com/search/2/search/21%20high%20street.json?key=MY_API_KEY&typeahead=true&limit=10&language=en-GB&countrySet=GB&minFuzzyLevel=1&maxFuzzyLevel=2", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
mode: 'cors'
})
.then(response => {
if (!response.ok) {
return Promise.reject(response);
}
return response.json();
})
.then(data => {
console.log("Success", data);
})
.catch(error => {
console.log("Fetch error", error);
});