Java 適用的 Google OAuth 用戶端程式庫範例
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Java 適用的 Google OAuth 用戶端程式庫可以與所有 OAuth 服務搭配使用,而不只是用於 Google API。我們目前只提供一個樣本,但我們希望日後能夠新增更多。我們也歡迎其他 API 使用範例,如成為著作人指南中所述。
Daily Motion OAuth2 指令列範例:
如要瀏覽所有 Google API 的範例,請參閱適用於 Java 的 Google API 用戶端程式庫範例。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThe Google OAuth Client Library for Java can be used with any OAuth service, not just Google APIs.\u003c/p\u003e\n"],["\u003cp\u003eCurrently, there is a sample for Daily Motion OAuth2, with instructions and source code provided.\u003c/p\u003e\n"],["\u003cp\u003eGoogle welcomes contributions for samples of other APIs.\u003c/p\u003e\n"],["\u003cp\u003eUsers can find samples for all Google APIs in the Google API Client Library for Java.\u003c/p\u003e\n"]]],[],null,["# Samples for the Google OAuth Client Library for Java\n\nThe Google OAuth Client Library for Java is designed to work with any OAuth\nservice on the web, not just with Google APIs. So far we only have one sample, but\nwe hope to add more over time. We also welcome contributions for samples for other\nAPIs, as described in our guide to\n[becoming a contributor](/api-client-library/java/google-oauth-java-client/contribute).\n\nDaily Motion OAuth2 command-line sample:\n\n- [Instructions for dailymotion-cmdline-sample](http://htmlpreview.github.io/?https://github.com/google/google-oauth-java-client/blob/master/samples/dailymotion-cmdline-sample/instructions.html)\n- [Source for dailymotion-cmdline-sample](https://github.com/google/google-oauth-java-client/tree/master/samples/dailymotion-cmdline-sample)\n\nTo browse samples for all Google APIs, see the\n[samples for the Google API Client Library for Java](/api-client-library/java/google-api-java-client/samples)."]]