AnsweredAssumed Answered

Accessing API through HTML and JavaScript

Question asked by Donovan Jenkins on Sep 24, 2018
Latest reply on Sep 24, 2018 by Kona Jones

Hey again everyone. I'd like to thank you all for answering my last question and being patient with my lack of knowledge when it comes to APIs.

 

Now, I am trying to access an API endpoint using a JavaScript GET request. However, the console log keeps reporting

 

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://canvas.instructure.com/api/v1/courses. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)."

 

Attached is a screenshot of my code. Thanks again for your help everyone.

Outcomes