We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e0c77c commit d382df6Copy full SHA for d382df6
1 file changed
apps/sim/app/api/tools/slack/channels/route.ts
@@ -93,7 +93,9 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
93
accessToken = resolvedToken
94
logger.info('Using OAuth token for Slack API')
95
96
- if (authz.resolvedCredentialId) {
+ // resolvedCredentialId is an account.id only for OAuth credentials
97
+ // (the service_account path returns a credential.id).
98
+ if (authz.credentialType === 'oauth' && authz.resolvedCredentialId) {
99
const [accountRow] = await db
100
.select({ accountId: account.accountId })
101
.from(account)
0 commit comments