MCPcopy Index your code
hub / github.com/simstudioai/sim / handleProviderChallenges

Function handleProviderChallenges

apps/sim/lib/webhooks/processor.ts:148–165  ·  view source on GitHub ↗
(
  body: unknown,
  request: NextRequest,
  requestId: string,
  path: string,
  rawBody?: string
)

Source from the content-addressed store, hash-verified

146const CHALLENGE_PROVIDERS = ['monday', 'slack', 'microsoft-teams', 'whatsapp', 'zoom'] as const
147
148export async function handleProviderChallenges(
149 body: unknown,
150 request: NextRequest,
151 requestId: string,
152 path: string,
153 rawBody?: string
154): Promise<NextResponse | null> {
155 for (const provider of CHALLENGE_PROVIDERS) {
156 const handler = getProviderHandler(provider)
157 if (handler.handleChallenge) {
158 const response = await handler.handleChallenge(body, request, requestId, path, rawBody)
159 if (response) {
160 return response
161 }
162 }
163 }
164 return null
165}
166
167/**
168 * Returns a verification response for provider reachability probes that happen

Callers 2

route.tsFile · 0.90
handleWebhookPostFunction · 0.90

Calls 2

getProviderHandlerFunction · 0.90
handleChallengeMethod · 0.80

Tested by

no test coverage detected