【发布时间】:2015-07-20 03:25:46
【问题描述】:
我需要你的帮助:
我正在使用 Google AdWords API PHP 库并将其集成到 Symfony2 中。我生成了获取 Refresh_token 的 URL,它似乎工作正常,我收到了刷新令牌。但每次我想访问 API 时都会收到“invalid_grant”错误。
我检查了我的 gMail-Test 帐户,但找不到我的应用程序。
这就是我所做的:
我生成了 Access-URL,它工作正常:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=4160XXXXX-7j6qpXXXXXXXXXXXXkctXXX.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%2F%2Fadcheck%2Fweb%2Fapp_dev.php%2Fapp%2Ftoken%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords&access_type=offline&approval_prompt=force
我点击它并接受它,以便我的“AdWords Web”应用可以访问和管理我的 Google AdWords 帐户。
Google 然后将我重定向到我的 Redirect_uri 并发送 refresh_token:
http://localhost/adcheck/web/app_dev.php/app/token/?code=4/ughxxxxxxxxxxxxxxxxxxxxxxxxxIZeF5yoMzI#
但“AdWords 网络”应用未连接。我在我的 Google Account Apps 列表中找不到它,尽管我得到了成功的答案和刷新令牌。
有人可以帮忙吗?我很无奈,找不到什么问题:/
【问题讨论】:
标签: oauth google-ads-api