Invoke a remote backend from Forge Backend using Forge Remote

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);
1 Like

forge-remote is still in preview, I would not rely on it to be honest :slight_smile:
Any idea or dates when forge-remote it is going to be released for a wider community ?