授权信息的准确存储位置在哪里? [英] Where is the authorization information exactly stored?

查看:153
本文介绍了授权信息的准确存储位置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://developers.google.com/google-apps/ calendar / quickstart / php#step_1_enable_the_api_name
在Google Calendar API的notes部分,它表示:

授权信息存储在文件中系统,所以后续执行不会提示进行授权。

解决方案

凭证文件的位置在CREDENTIALS_PATH变量中指定。
使用expandHomeDirectory函数获取确切位置。



$ credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);
echo $ credentialsPath



Mine位于:C:\ Users \MyUsername\.credentials\calendar -php-quickstart.json



我之所以会问这个问题,是因为我有一个错误:


刷新OAuth2令牌时出错,消息:'{error:unauthorized_client.....

我删除了文件以再次验证身份。


https://developers.google.com/google-apps/calendar/quickstart/php#step_1_enable_the_api_name Under the notes section of Google Calendar API it says that:

"Authorization information is stored on the file system, so subsequent executions will not prompt for authorization."

解决方案

The credentials file's location is specified in the CREDENTIALS_PATH variable. use the expandHomeDirectory function to get the exact location.

$credentialsPath = expandHomeDirectory(CREDENTIALS_PATH); echo $credentialsPath

Mine is is located on: C:\Users\MyUsername\.credentials\calendar-php-quickstart.json

The reason I asked this is that I am having an error saying

Error refreshing the OAuth2 token, message: '{ "error" : "unauthorized_client".....

I deleted the file to become authenticated again.

这篇关于授权信息的准确存储位置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆