02-06-2021 07:10
02-06-2021 07:10
I am working on an app for the fitbit versa 3 and fitbit sense. With the app you have to control philips hue lamps. I therefore have to make a web request with fetch, but it doesn't work.
I am using the following code:
fetch('https://discovery.meethue.com', {
method: 'GET', // or 'PUT'
})
.then(response => response.json())
.then(data => {
console.log('Success:', data);
})
.catch((error) => {
console.error('Error:', error);
});
When I run the program on my own phone and my versa 3 I get no output from my phone. I also don't see the app on my phone. I searched the internet but found nothing. Can anyone help me?
02-11-2021 03:36
02-11-2021 03:36
Did you grant the access_internet permission to your app?