I would like to invoke a remote backend (hosted outside the Atlassian platform) from Forge using invokeRemote bridge method.
import { invokeRemote } from "@forge/bridge";
Can I use this from Forge Backend (instead of Custom UI/Ui Kit 2 frontend)?
I got an error on deploy like:
...
Error: Error thrown in the snapshot context.
App code snapshot error: Snapshot error occurred: Error: window is not defined
...
I need to use this on a bitbucket:mergeCheck event, but id doesn’t have a UI.
Is there any other option to use Forge Remote from Forge Backend?
Or should I use api.fetch
instead?
import api from '@forge/api';
...
api.fetch(url, init);