Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/sim/app/api/tools/slack/channels/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
accessToken = resolvedToken
logger.info('Using OAuth token for Slack API')

if (authz.resolvedCredentialId) {
// resolvedCredentialId is an account.id only for OAuth credentials
// (the service_account path returns a credential.id).
if (authz.credentialType === 'oauth' && authz.resolvedCredentialId) {
const [accountRow] = await db
.select({ accountId: account.accountId })
.from(account)
Expand Down
Loading