<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Google APIs 使用帶有VBA-Web的Google API的示例包含在項目的`examples /`文件夾中。 一些細節: ## [](https://github.com/VBA-tools/VBA-Web/wiki/Google-APIs#authentication)Authentication授權 有許多方法可以使用Google的OAuth 2.0身份驗證,但是要與VBA-Web一起使用,不能使用任何需要回調網址的方法。 這限制了[已安裝的應用程序/設備](https://developers.google.com/accounts/docs/OAuth2#installed)的身份驗證方法。 1. 轉到[Google的API控制臺](https://code.google.com/apis/console#access)以使用Google創建新的應用程序。 在“客戶端ID設置”部分,選擇“已安裝的應用程序和其他”。 存儲生成的客戶端ID和密碼。 2. 確定應用程序的所需范圍。 例如,要訪問Google Analytics數據,需要在范圍內將其定義為`https://www.googleapis.com/auth/analytics.readonly`。 通常,每個范圍都以`https://www.googleapis.com/auth/`作為前綴,然后添加特定范圍。 有關可用范圍的列表,請訪問[Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/) 3. 將`GoogleAuthenticator`類添加到項目中并按如下方式進行設置: ~~~vbnet Dim Auth As New GoogleAuthenticator Auth.Setup _ ClientId:="ClientId", _ ClientSecret:="ClientSecret" Auth.Scope = Array("https://www.googleapis.com/auth/analytics.readonly") Auth.Login Set Client.Authenticator = Auth ~~~ ## [](https://github.com/VBA-tools/VBA-Web/wiki/Google-APIs#example-request)Example Request請求范例 通過客戶端的身份驗證設置,您可以使用正常的請求配置。 以下是用于檢索Google Analytics數據以及如何設置請求的所需網址示例: ~~~vbnet '// 期望的請求: GET https://www.googleapis.com/analytics/v3/data/ga '// ?ids=ga:12345 '// &start-date=2008-10-01 '// &end-date=2008-10-31 '// &metrics=ga:visits,ga:bounces '// Client.BaseUrl = "https://www.googleapis.com/analytics/v3/" Public Function AnalyticsRequest(ProfileId As String, StartDate As Date, EndDate As Date) As RestRequest Set AnalyticsRequest = New WebRequest AnalyticsRequest.Resource = "data/ga" AnalyticsRequest.Method = WebMethod.HttpGet AnalyticsRequest.AddQuerystringParam "ids", "ga:" & ProfileId AnalyticsRequest.AddQuerystringParam "start-date", Format(StartDate, "yyyy-mm-dd") AnalyticsRequest.AddQuerystringParam "end-date", Format(EndDate, "yyyy-mm-dd") AnalyticsRequest.AddQuerystringParam "metrics", "ga:visits,ga:bounces" End Function ~~~ ### [](https://github.com/VBA-tools/VBA-Web/wiki/Google-APIs#links)鏈接: * [使用OAuth 2.0訪問Google API,已安裝的應用程序/設備](https://developers.google.com/accounts/docs/OAuth2#installed) * [將OAuth 2.0用于已安裝的應用程序](https://developers.google.com/accounts/docs/OAuth2InstalledApp) * [Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看