Issue with Webtriggers and API Calls Resulting in 401 Errors

Hi,

I am currently working on a forge custom-ui project where I need to invoke web triggers through a third-party server. Within the logic of the web trigger, I have several API calls to fetch issues and sprints. However, these API calls are being rejected with 401 errors.

Here is the snippet of the one of the API calls

const payload = {
    id: boardId,
    state: 'active'
};
let sprints = await api.asUser().requestJira(route`/rest/agile/1.0/board/${payload.id}/sprint?state=${payload.state}`);

And this is the error I am receiving:

PROXY_ERR: Forge platform failed to process runtime HTTP request - 401 - AUTH_TYPE_UNAVAILABLE

Thanks

Hi @snehilsankalp. Try updating the API call to call asApp() instead. Web triggers, scheduled events, and async events can only make calls as the app.

1 Like