I hope this message finds you well. I am writing to seek assistance with a CORS (Cross-Origin Resource Sharing) error that I’m encountering while trying to access the Nuki API.
The specific error message I’m receiving is as follows: “Access to XMLHttpRequest at ‘https://api.nuki.io/oauth2/authorize?response_type=code&client_id=9zzsaRVrchVZ18E3lt1UVQ&redirect_uri=https://dev.memoriarigorosa.com/testes/&scope=smartlock:write%20smartlock:read%20smartlock:action:log%20smartlock:action:manage%20smartlock:auth%20smartlock:state:read’ from origin ‘https://dev.memoriarigorosa.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”
This error suggests that the ‘Access-Control-Allow-Origin’ header is not included in the response from the Nuki API, thereby preventing cross-origin requests from my domain ‘https://dev.memoriarigorosa.com’.
I have checked the API documentation, and it does not provide specific instructions or requirements regarding CORS. Therefore, I kindly request your assistance in resolving this issue. Could you please consider adding the necessary ‘Access-Control-Allow-Origin’ header to the API response or provide guidance on how to properly access the API from a different origin?
Thank you for your attention to this matter. I appreciate your support and look forward to hearing back from you.