Yes, thanks! This has been solved for me here: Using JavaScript fetch to get publicly available page from Discourse into an external site (Discourse API) - #2 by pfaffman
@fahadaslam98 as @RGJ said, if the CORS is properly configured then removing the API keys from the headers should work,