申請の種類を選択する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google 広告アカウントにはユーザーデータが含まれているため、アプリケーションがこのデータにアクセスするには、ユーザーの承認が必要です。この承認を取得する方法に基づいて、大きく 2 つのアプローチがあります。
アプリの種類を選択する
Google 広告アカウントにはユーザーデータが含まれているため、アプリがこのデータにアクセスするには、ユーザーからの承認が必要です。この承認を取得する方法に基づいて、大きく 2 つのアプローチがあります。
|
サービス アカウント |
ユーザー認証 |
概要 |
サービス アカウントにそのアカウントへのアクセス権を付与するように、Google 広告アカウントを手動で構成します。その後、アプリはサービス アカウントの認証情報を使用して、ユーザーの操作なしで Google 広告アカウントに API 呼び出しを行うことができます。API 呼び出しは、サービス アカウントが Google 広告アカウントにアクセスできる限り機能します。 |
アプリがユーザーの Google 広告アカウントを管理できるように、ユーザーから 1 回限りの OAuth 2.0 認証を取得します。その後、アプリは OAuth 2.0 更新トークン(OAuth 2.0 認証プロセスの一環として発行)を使用して、Google 広告アカウントに API 呼び出しを行うことができます。API 呼び出しは、ユーザーが認証を取り消すか、非アクティブなどの理由で認証が期限切れになるまで機能します。 |
使いやすさ |
アプリにユーザー認証がないため、必要な構成と承認が最小限に抑えられます。 |
ユーザー認証がアプリの一部であるため、広範な構成と承認が必要になります。 |
推奨事項 |
推奨されるアプローチとして強く推奨 |
以前の方法。サービス アカウントに Google 広告アカウントに必要な権限を付与できない場合のフォールバック オプションとして使用します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-05 UTC。
[null,null,["最終更新日 2025-09-05 UTC。"],[],[],null,["# Choose your application type\n\nSince Google Ads accounts contain user data, your application must obtain\nauthorization from the user to access this data. There are two broad approaches\nbased on how you obtain this authorization.\n\nChoose your app type\n--------------------\n\nSince Google Ads accounts contain user data, your app needs to obtain\nauthorization from the user to access this data. There are two broad approaches\nbased on how you obtain this authorization.\n\n| | **Service Account** | **User Authentication** |\n| Summary | Manually configure your Google Ads account to give a service account access to that account. Afterwards, your app can use the service account credentials to make API calls to the Google Ads account without any user interaction. The API calls work as long as the service account has access to the Google Ads account. | Obtain a one-time OAuth 2.0 authorization from a user to allow your app to manage their Google Ads account. Afterwards, your app can use the OAuth 2.0 refresh token (issued as part of the OAuth 2.0 authorization process) to make API calls to the Google Ads account. The API calls work as long as the user doesn't revoke the authorization, or until the authorization expires due to inactivity or other reasons. |\n| Ease of use | Minimal configuration and approvals required due to lack of user authorization in the app. | Extensive configuration and approvals required due to user authentication being part of the app. |\n| Recommendation | **Strongly recommended** as the preferred approach | Legacy approach. Use as a fallback option when you cannot give a service account the required permissions to your Google Ads account. |\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|"]]