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

Function getAccessToken

apps/sim/lib/data-drains/destinations/bigquery.ts:82–90  ·  view source on GitHub ↗
(jwt: JWT, forceRefresh = false)

Source from the content-addressed store, hash-verified

80}
81
82async function getAccessToken(jwt: JWT, forceRefresh = false): Promise<string> {
83 if (forceRefresh) {
84 /** Clearing `credentials` forces `getAccessToken` to mint a new token instead of returning the cached one. */
85 jwt.credentials = {}
86 }
87 const { token } = await jwt.getAccessToken()
88 if (!token) throw new Error('Failed to obtain BigQuery access token')
89 return token
90}
91
92interface InsertAllInput {
93 config: BigQueryDestinationConfig

Callers 2

postInsertAllFunction · 0.70
testFunction · 0.70

Calls

no outgoing calls

Tested by 1

testFunction · 0.56