naystack - v1.9.9
    Preparing search index...

    Function exchangeYouTubeCode

    • Exchanges an OAuth code for YouTube tokens.

      Parameters

      • code: string

        Authorization code from the callback.

      • redirectURI: string

        The same URI used to obtain the code.

      Returns Promise<
          | {
              accessToken: string;
              expiresAt: Date
              | undefined;
              refreshToken: string | undefined;
              scopes: string[] | undefined;
          }
          | undefined,
      >

      { accessToken, refreshToken, expiresAt, scopes }, or undefined if Google returned no access token.