From a68fcf8840ab378604cfe17b2afd5bbdb2632597 Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Thu, 8 Jan 2026 11:10:59 +0100 Subject: [PATCH] fix refresh token endpoint (#26577) Co-authored-by: CarinaWolli --- companion/services/oauthService.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/companion/services/oauthService.ts b/companion/services/oauthService.ts index abd9bc6728..aa2f66fe1c 100644 --- a/companion/services/oauthService.ts +++ b/companion/services/oauthService.ts @@ -526,15 +526,19 @@ export class CalComOAuthService { refresh_token: refreshToken, }; - const tokenEndpoint = `${this.config.calcomBaseUrl}/api/auth/oauth/token`; + const refreshTokenEndpoint = `${this.config.calcomBaseUrl}/api/auth/oauth/refreshToken`; if (this.isRunningInIframe()) { - const tokens = await this.exchangeCodeForTokensViaExtension(tokenRequest, tokenEndpoint); + const tokens = await this.exchangeCodeForTokensViaExtension( + tokenRequest, + refreshTokenEndpoint + ); await this.syncTokensToExtension(tokens); return tokens; } - return this.exchangeCodeForTokensDirect(tokenRequest, tokenEndpoint); + const result = await this.exchangeCodeForTokensDirect(tokenRequest, refreshTokenEndpoint); + return result; } }