Skip to content

Commit 4916374

Browse files
fix: zoominfo re-authentication bug
1 parent 6a67e3d commit 4916374

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/zoominfo/src/zoominfo-client.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { z } from 'zod'
1313
export namespace zoominfo {
1414
export const API_BASE_URL = 'https://api.zoominfo.com'
1515

16-
// Access tokens expire after 60 minutes, so renew them every 55 minutes.
17-
export const ACCESS_TOKEN_EXPIRATION_MS = 55 * 60 * 1000
16+
// Access tokens expire after 60 minutes, so renew them every 57 minutes.
17+
export const ACCESS_TOKEN_EXPIRATION_MS = 57 * 60 * 1000
1818

1919
// Allow up to 1500 requests per minute by default.
2020
// https://api-docs.zoominfo.com/#rate-and-usage-limits
@@ -247,6 +247,7 @@ export namespace zoominfo {
247247
export interface EnrichCompanyResult {
248248
input: Partial<EnrichCompanyOptions>
249249
data: EnrichedCompany[]
250+
matchStatus?: MatchStatus
250251
}
251252

252253
export interface EnrichedCompany {
@@ -1186,7 +1187,7 @@ export class ZoomInfoClient extends AIFunctionsProvider {
11861187
if (
11871188
!force &&
11881189
this.accessToken &&
1189-
this.accessTokenDateMS! + zoominfo.ACCESS_TOKEN_EXPIRATION_MS < Date.now()
1190+
this.accessTokenDateMS! + zoominfo.ACCESS_TOKEN_EXPIRATION_MS > Date.now()
11901191
) {
11911192
// Access token is still valid.
11921193
return

0 commit comments

Comments
 (0)