I want to call the API which runs in my localhost, port 9090 using the forge fetch API. But an error is thrown saying “Address not allowed”.
const result = await fetch("https://localhost:9090/getData");
const status = result.status;
"message": "Address not allowed",
Is there any way to make a successful call to the API which runs on my localhost?
Yes, use a tool like ngrok. https://ngrok.com/
It’s a free tool that will set up web proxy to your localhost.
Does your Manifest include the external address as part of the Permissions? Like,
Are you importing
@forge/api? If so, be aware that Forge functions don’t run in your browser but on a backend provided by Atlassian (see Runtime). So in general you won’t be able to access your
If you want to test your Forge app with a local API, use Ngrok or a similar tool to expose it (and add the resulting URL to your app’s permissions).