Using Forge External Authentication from Workflow Post Functions

I have a use case where I need to use an external API with OAuth2 authentication in a Forge app from a backend service, a workflow post-function in this case.

My post-function needs to send an email with attachments to a given email address. Since it needs to include attachments, I cannot use the Jira notification REST API (which otherwise would have been perfect for this).

The withProvider() approach gets me 90% to my goal but lets me down when trying to use it from a back-end function that runs outside the scope of a specific user (something like api.asApp().withProvider() does not exist).

Ideally, I would like to be able to set up a connection to a specific email account for the whole app to use.

It does not look like I can get the credentials from the Forge API (otherwise I could store those and make simple fetch calls).

Any other suggestions?

@muschol I believe this is not currently on the 12 month roadmap, but is tracked as FRGE-729.

Speak to @reddy1 about your needs. He is currently interested in use cases for this.

1 Like

Thanks @david, I have voted for FRGE-729.

I have also reached out to Rohit about my case.