[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Class GoogleToken (8.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [8.0.0 (latest)](/nodejs/docs/reference/gtoken/latest/gtoken/googletoken)\n- [7.1.0](/nodejs/docs/reference/gtoken/7.1.0/gtoken/googletoken)\n- [7.0.1](/nodejs/docs/reference/gtoken/7.0.1/gtoken/googletoken)\n- [6.1.2](/nodejs/docs/reference/gtoken/6.1.2/gtoken/googletoken)\n- [5.3.2](/nodejs/docs/reference/gtoken/5.3.2/gtoken/googletoken) \n\nPackage\n-------\n\n[gtoken](../overview.html)\n\nConstructors\n------------\n\n### (constructor)(options)\n\n constructor(options?: TokenOptions);\n\nCreate a GoogleToken.\n\nProperties\n----------\n\n### accessToken\n\n get accessToken(): string | undefined;\n\n### additionalClaims\n\n additionalClaims?: {};\n\n### eagerRefreshThresholdMillis\n\n eagerRefreshThresholdMillis?: number;\n\n### email\n\n email?: string;\n\n### expiresAt\n\n expiresAt?: number;\n\n### idToken\n\n get idToken(): string | undefined;\n\n### iss\n\n iss?: string;\n\n### key\n\n key?: string;\n\n### keyFile\n\n keyFile?: string;\n\n### rawToken\n\n rawToken?: TokenData;\n\n### refreshToken\n\n get refreshToken(): string | undefined;\n\n### scope\n\n scope?: string;\n\n### sub\n\n sub?: string;\n\n### tokenExpires\n\n tokenExpires?: number;\n\n### tokenType\n\n get tokenType(): string | undefined;\n\n### transporter\n\n transporter: Transporter;\n\nMethods\n-------\n\n### getCredentials(keyFile)\n\n getCredentials(keyFile: string): Promise\u003cCredentials\u003e;\n\nGiven a keyFile, extract the key and client email if available\n\n### getToken(opts)\n\n getToken(opts?: GetTokenOptions): Promise\u003cTokenData\u003e;\n\nReturns a cached token or retrieves a new one from Google.\n\n### getToken(callback, opts)\n\n getToken(callback: GetTokenCallback, opts?: GetTokenOptions): void;\n\n### hasExpired()\n\n hasExpired(): boolean;\n\nReturns whether the token has expired.\n\ntrue if the token has expired, false otherwise.\n\n### isTokenExpiring()\n\n isTokenExpiring(): boolean;\n\nReturns whether the token will expire within eagerRefreshThresholdMillis\n\ntrue if the token will be expired within eagerRefreshThresholdMillis, false otherwise.\n\n### revokeToken()\n\n revokeToken(): Promise\u003cvoid\u003e;\n\nRevoke the token if one is set.\n\n### revokeToken(callback)\n\n revokeToken(callback: (err?: Error) =\u003e void): void;"]]