Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fetch not working + app don't run on companion

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?

Best Answer
0 Votes
1 REPLY 1

Did you grant the access_internet permission to your app?

Best Answer
0 Votes