Hi team,
I have been facing an issue moving forward with the channel apps.
I am trying to render a dashboard UI as there is an option within the channel manifest, but I am unable to fetch the metadata.
Could you please let us know how to get the metadata for dashboard_url or else we can pass it as params?
Shared the snippet below that I have used.
export const manifest = (req: Request, res: Response) => {
console.log('manifest >>', req.body);
const metadata = req.body?.metadata?.userToken || 'notoken';
res.send({
name: 'Channel Integration',
id: 'zendesk-channel-integration',
author: 'Anish',
version: 'v0.0.1',
channelback_files: true,
create_followup_tickets: true,
urls: {
admin_ui: './admin_ui',
pull_url: './pull',
channelback_url: './channelback',
clickthrough_url: './clickthrough',
healthcheck_url: './healthcheck',
event_callback_url: './event_callback',
dashboard_url: `./dashboard_ui/${metadata}`,
},
});
};
export const dashboardUi = (req: Request, res: Response) => {
const { metadata, state } = req.body;
console.log('dashboard_ui >>', req.params, metadata, state);
};
Hi team,
Is there anything else we can achieve?