【Google Calendar API v3】get events list with OAuth 2.0 &
It took me some time to learn about the Google Calendar API V3 and I have encountered some problems. So it is necessary to summary the steps, just take the 'event list' as an example. The event list API is here:https://developers.google.co
It took me some time to learn about the Google Calendar API V3 and I have encountered some problems. So it is necessary to summary the steps, just take the 'event list' as an example.
The event list API is here: https://developers.google.com/google-apps/calendar/v3/reference/events/list
Details of using OAuth 2.0 for Login is here: https://developers.google.com/accounts/docs/OAuth2Login
Assumption: you have alreay registered your app and turn the Calendar API 'ON' in the 'API & auth' sidebar.
Note: The request needs authorization and I use OAuth 2.0, here are the steps.
Step 1. Send an Authentication Request to Google
HTTP GET: https://accounts.google.com/o/oauth2/auth?
client_id=XXXXXXXXX&
response_type=code&
scope=https://www.googleapis.com/auth/calendar&
redirect_uri=XXXXXXXXX&
login_hint=XXXXXX
client_id: can be seen in your Google Cloud Console.
redirect_uri: also in your Google Cloud Console, you must write it down in your registered apps page.
login_hint=google account
Then your will find the code parameter in the redirect uri.
Step 2. Exchange Code for Access Token and ID Token
Use the code you got in the last step to post request. The actual request might look like:
<span>POST /o/oauth2/token HTTP/1.1 Host: accounts.google.com Content-Type: application/x-www-form-urlencoded code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7& client_id=8819981768.apps.googleusercontent.com& client_secret={client_secret}& redirect_uri=https://oauth2-login-demo.appspot.com/code& grant_type=authorization_code</span>
I use the Chrome Plugin Rest Client to post the request and get access token.
Then you will get the access_token in the response.
Step 3. Get Events List NOW!
With the access_token, you are able to request the event list according to Google Calendar API.The whole HTTP GET URI is like:
https://www.googleapis.com/calendar/v3/calendars/{your calendar id}/events?
code=XXXXXX&
client_id=XXXXXX&
client_secret=XXXXXX&
redirect_uri=XXXXX&
grant_type=authorization_code
&access_token=XXXXXXXX
{your calendar id} is your google account, looks like XXX@gmail.com
Then you will get the JSON response!

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









現在、この秋には 4 つの新しい Pixel スマートフォンが発売される予定です。要約すると、このシリーズは発売時にPixel 9とPixel 9 Proを搭載すると噂されています。ただし、Pixel 9 ProはPixel 8 ProではなくiPhone 16 Proのライバルになります(最新情報)

Google は、Pixel 8 シリーズで DisplayPort 代替モードを導入しており、新たに発売された Pixel 9 ラインナップにも搭載されています。これは主に、接続された画面でスマートフォンのディスプレイをミラーリングするためにありますが、デスクトップにも使用できます。

Googleは最近、Pixel 9ラインのTensor G4に関するパフォーマンスの懸念に対応しました。同社は、このSoCはベンチマークを上回るように設計されていないと述べた。代わりに、チームは Google が求めている分野でパフォーマンスを向上させることに重点を置きました。

Google AI は、Gemini 1.5 Pro 大規模言語モデル (LLM) を皮切りに、拡張コンテキスト ウィンドウとコスト削減機能へのアクセスを開発者に提供し始めました。以前は待機リストを通じて利用可能でしたが、完全な 200 万トークンのコンテキストウィンドウが利用可能になりました

最新アップデート (v15.29.34.29 ベータ版) の APK 分解を考慮すると、Google の AI アシスタント Gemini はさらに高性能になる予定です。このテクノロジー巨人の新しい AI アシスタントには、いくつかの新しい拡張機能が追加される可能性があると伝えられています。これらの拡張機能は

Pixel 9 シリーズは、8 月 13 日のリリースが予定されており、もうすぐ登場します。最近の噂によると、Pixel 9、Pixel 9 Pro、Pixel 9 Pro XLは、128 GBのストレージから始まるPixel 8とPixel 8 Pro(Amazonで現在749ドル)をミラーリングします。

Android Authority が、Google が Android 14 QPR3 Beta 2.1 内に隠していた新しい Android デスクトップ モードをデモンストレーションしてから数か月が経過しました。 Google が Pixel 8 と Pixel 8 に DisplayPort Alt Mode サポートを追加することに追随して登場

Googleが新しいハードウェアを完全に公開するまでにおよそ2週間かかる。いつものように、Pixel Watch 3、Pixel Buds Pro 2、Pixel 9 スマートフォンなど、数え切れないほどの情報源が新しい Pixel デバイスの詳細をリークしています。同社もそうらしい
