More CORS policy help

Having trouble again with CORS policy with Hubitat Maker API. Stumped. I’m getting this error in the console:

Access to XMLHttpRequest at ‘https://cloud.hubitat.com/api/XXXX/apps/913/devices/4200?access_token=XXXX’ from origin ‘https://run.sharptools.app’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Even though my Maker API instance has:

What am I forgetting or doing wrong here?

Mine looks like the following and works as expected:

I tried mirroring your settings and those worked fine for me too. If you have multiple Maker API instances, I would double check that you’ve applied it to the correct instance and have saved those changes.

I would also note that Custom Tiles can now access ‘Thing’ resources directly which is a more efficient approach in most cases:

:link: Custom Tiles: Access to Things and Variables

Ah, that seems like a good idea. Unfortunately my account seems to be stuck or hanging indefinitely after trying to add some more devices for access by custom tiles. Any idea what’s going on? I’ve rebooted multiple times and my hub is responding normally otherwise.

As the information notice indicates, that message is coming directly from Hubitat, so it seems like their Cloud Relay is having difficulty communicating with your hub.

I wonder if that’s perhaps the underlying cause of the errors you were seeing with the Hubitat Maker API and the CORS errors. Did you try opening the Hubitat Maker API Cloud URL that you were trying to use in the Custom Tile directly in your browser and what was the result?

Ah, yes testing it with the browser revealed it wasn’t working there either. So was a hub/network issue, not a sharptools issue. Ended up needing to reboot the router (strange). Oh well, seems fixed now. Thanks! I’ll def check out the new Things approach tho!

1 Like