MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getSlackInstallUrl

Function getSlackInstallUrl

packages/integrations/src/slack.ts:25–42  ·  view source on GitHub ↗
({
  integrationId,
  organizationId,
}: { integrationId: string; organizationId: string })

Source from the content-addressed store, hash-verified

23 } as unknown as InstallProvider);
24
25export const getSlackInstallUrl = ({
26 integrationId,
27 organizationId,
28}: { integrationId: string; organizationId: string }) => {
29 if (!SLACK_CLIENT_ID) {
30 throw new Error('SLACK_CLIENT_ID is not set (slack.ts)');
31 }
32 return slackInstaller.generateInstallUrl({
33 scopes: [
34 'incoming-webhook',
35 'chat:write',
36 'chat:write.public',
37 'team:read',
38 ],
39 redirectUri: SLACK_OAUTH_REDIRECT_URL,
40 metadata: JSON.stringify({ integrationId, organizationId }),
41 });
42};
43
44export function sendSlackNotification({
45 webhookUrl,

Callers 1

integration.tsFile · 0.90

Calls 1

stringifyMethod · 0.45

Tested by

no test coverage detected