CORS Policy Blocking Calls from Web Browser App to IoT API Endpoints

I have a Web app (Angular 17 app, hosted on a cloud-based Web Server; the problem I'm seeing is being generated locally during development, but I'm assuming it'll behave the same way when published to the cloud).

From my Web app (running in a browser), I need it to call into the IoT Cloud via the documented API, but I'm prevented by CORS restrictions.

My first call is just to generate a Token from my Client ID and Secret, via:

`https://api2.arduino.cc/iot/v1/clients/token'

That call yields:

Access to XMLHttpRequest at 'https://api2.arduino.cc/iot/v1/clients/token' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

What can I do to get around this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.