adapterFromForgePayload
adapterFromForgePayload(
payload,product,options?):ForgeRemoteAdapter
Defined in: packages/core/src/adapters/ForgeInvocationPayload.ts:125
Create a ForgeRemoteAdapter from a Forge Remote invocation payload.
This is the recommended way to create an adapter in a Forge Remote handler —
it extracts installationId and appSystemToken from the payload automatically
and reads FORGE_EGRESS_PROXY_URL from the environment.
Parameters
Section titled “Parameters”payload
Section titled “payload”The Forge Remote invocation payload
product
Section titled “product”"jira" | "confluence"
The Atlassian product to make requests to
options?
Section titled “options?”Optional overrides (e.g. proxyUrl for testing)
Returns
Section titled “Returns”Example
Section titled “Example”import { adapterFromForgePayload, type ForgeInvocationPayload } from '@forge-clients/core';import { getIssue } from '@forge-clients/jira/v3';
export async function handler(payload: ForgeInvocationPayload) { const client = adapterFromForgePayload(payload, 'jira'); return getIssue(client, { issueIdOrKey: 'PROJ-123' });}Throws
Section titled “Throws”if FORGE_EGRESS_PROXY_URL is not set and no proxyUrl override is provided