@forge/api ignores query string

Hey @RoiLarrenceAmatong,

The route tagged template literal strips everything after the ? in each parameter to prevent query string injection attacks in Forge apps. You will need to make a query where the ? is not part of the interpolated parameters, for example:

route`${configData.URL_CONFIG_JIRA_URLS.BASE_URL}${path}?${query}`
// or
route`${configData.URL_CONFIG_JIRA_URLS.BASE_URL}${path}?accountId=${accountId}`
// etc.

See the documentation on route here for more information. In case it helps with debugging, you should be able to see the resultant url that is being requested by running:

console.log(route`${url}`);

Hope that helps, let me know if you have any issues.
Sam

1 Like