# What are the expected use-cases of invokeRemote?

**URL:** <https://community.developer.atlassian.com/t/what-are-the-expected-use-cases-of-invokeremote/81936>\
**Category:** Forge\
**Tags:** forge-fetch, forge-remote\
**Created:** [July 19, 2024, 4:56am UTC](https://community.developer.atlassian.com/t/what-are-the-expected-use-cases-of-invokeremote/81936 "2024-07-19T04:56:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulHicks](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/paulhicks/32/51432_2.png) [@PaulHicks](https://community.developer.atlassian.com/u/PaulHicks)\
**Post date:** [July 19, 2024, 4:56am UTC](https://community.developer.atlassian.com/t/what-are-the-expected-use-cases-of-invokeremote/81936/1 "2024-07-19T04:56:22Z")

</div>

I’d like to know if I ought to use invokeRemote() from my resolver. I’m looking to data from a 3rd party site. No auth is required, it’s a simple GET to a public site (specifically, it’s fetching a list of public holidays, but that’s not important).

I was using `fetch()` from @forge/api and it worked fine.

I thought, since I’ve declared a remote in my manifest (I think I need to do that so that whoever’s installing my app will be told that it’s going to get information from this 3rd party site, right?), I should use that. So I’m trying to replace `fetch(new URL(3rdpartySite)....)` with `invokeRemote(keyTo3rdPartySiteRemote, ...)`. However, I’m getting a HTTP 400 status code in my tunnel output, with the message ‘INVALID\_REMOTE\_ERR: Invalid remote key provided: keyTo3rdParthSiteRemote’ (though it is the correct remote key, I presume there’s a problem with it somehow).

So before I spend too much time digging into why this isn’t working… is it supposed to work like this? All the examples of invokeRemote seem to be much more complicated, requiring auth, endpoints, and a lot more YAML. It seems overkill for something I already had working in just a few lines of JS. Is “a simple GET from a simple site” one of the use-cases of `invokeRemote`?

---

<div class="post-metadata">

**Author:** ![ibuchanan](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ibuchanan/32/35815_2.png) [@ibuchanan](https://community.developer.atlassian.com/u/ibuchanan)\
**Post date:** [July 19, 2024, 2:38pm UTC](https://community.developer.atlassian.com/t/what-are-the-expected-use-cases-of-invokeremote/81936/2 "2024-07-19T14:38:47Z")

</div>

@PaulHicks,

> [@PaulHicks](#):
>
> Is “a simple GET from a simple site” one of the use-cases of `invokeRemote`?

No. If you had `fetch` working, there’s no reason to use `invokeRemote`.

But I can see your confusion. Here’s what the docs say about [Forge remote use cases](https://developer.atlassian.com/platform/forge/remote/#use-cases):

> - Create an integration app that sends or receives data between an Atlassian product and a third-party product.
> - Invoke a complex existing application, for example, your own customized large language model that provides AI services to your app that runs on a non-Atlassian platform.

To me, those use cases are indistinguishable from `fetch`. So let me try to adjust those definitions to better differentiate:

- Create an integration app that sends or receives data between an Atlassian product and a third-party product _where you control the 3rd party auth & infrastructure_.
- Invoke a complex existing application, for example, your own customized large language model that provides AI services to your app that runs on a non-Atlassian platform _that you control_.

I’ll have a conversation with Forge team and see if we can update our docs so others don’t fall into the same confusion.
