Paste this URL in your browser:
https://accounts.google.com/o/oauth2/v2/auth?response_type=code&access_type=offline&client_id=...
在无痕浏览器会话或无痕式窗口中访问该网址。
使用您用于访问 Google Ads 的 Google 账号登录。通常,这是 Google Ads 经理账号的登录电子邮件地址,其中包含您需要在其账号层次结构下管理的所有账号。点击 OAuth 2.0 同意屏幕上的继续。
系统会将您转到一个页面,其中会显示一条消息,指明授权已成功。
Your refresh token has been fetched. Check the console output for further
instructions.
Your refresh token is: 1/Yw**********
Copy the text below into a file named "google_ads_php.ini" in your home directory, and
replace "INSERT_DEVELOPER_TOKEN_HERE" with your developer token:
[GOOGLE_ADS]
developerToken = "INSERT_DEVELOPER_TOKEN_HERE"
[OAUTH2]
Copy the following lines to your 'google_ads_php.ini' file:
clientId = "***********************apps.googleusercontent.com"
clientSecret = "****"
refreshToken = "****"
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-29。"],[[["This guide explains how to set up OAuth2 for Google Ads API access using your own credentials through either a desktop or web flow."],["You'll need to create OAuth2 credentials by configuring a Google API Console project and noting your client ID and secret."],["The setup involves running a client library example that guides you through an authorization process using your Google account."],["Upon successful authorization, you'll receive a refresh token and instructions to configure your client library with the necessary properties."]]],[]]