php - 从 Google 驱动器身份验证重定向后不可接受的链接
问题描述
这是我的身份验证代码,
$client = new Google_Client();
$client->setApplicationName('Google Drive API PHP Quickstart');
$client->setRedirectUri("https://example.com/google_redirect");
$client->setClientId("my-client-id");
$client->setClientSecret("my-client-secret");
$client->setScopes(Google_Service_Drive::DRIVE);
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
我可以与此联系。但是从谷歌授权后,它的重定向是这样的,
该页面显示此消息:
我想,我可以通过应用此处的任何内容来修复此错误消息:不可接受!在此服务器上找不到所请求资源的适当表示。此错误是由 Mod_Security 生成的
但这不是方便的方法。每个用户都应该这样做。
是否有任何特殊参数或其他东西可以防止这种情况或通过 Google 中的 POST 方法获取数据?
寻求帮助。提前致谢。
解决方案
推荐阅读
- php - How to exclude specific post from wp functions.php code?
- python - 如何将我的数据集 (MSSQL DB) 导入并拆分到我的 python 预测模型中
- java - 描述这种随机但公平地调用学生的程序/算法的正确术语是什么?
- python - Python:将文件从 day_one.py 导入到 main.py,然后在 day_one 我从 main.py 导入一个函数。错误无法导入
- telerik - Telerik 报告条码控件添加空白页
- django - Heroku/Django 部署:为什么我在成功部署和静态收集时收到错误 500?
- c++ - 在 C++ 中从一个类访问另一个类的变量
- python-3.x - 如何在 tkinter python3.7 中更改 messagebox.showinfo(message='Hello') 中消息的字体大小
- powerbi - 在 Dax 中使用“IN”的 Power Bi
- php - 通过 Bitbucket Webhook Throwing Error 在 PHP Exec 中运行 SH 脚本