[Solved]无法使用,提示Failed to get accesstoken. Maybe refresh_token expired. #15

Closed
opened 2021-06-17 14:06:20 +08:00 by kcn3388 · 16 comments
kcn3388 commented 2021-06-17 14:06:20 +08:00 (Migrated from github.com)

已经阅读须知并且改了权限,但是仍然报这个错误。

折叠图片

image

已经通过描述的方法获取到了两个token,但是输入以后仍然无法使用

折叠图片

image
image

使用的是vultr的vps,也不会存在无法访问GitHub的问题
在手动创建token.php以后报错消失但是变白屏,是不是可以通过手动修改token.php的方法来避开报错?

补充:在使用小工具microsoft-graph-api-auth获取token时,于步骤4. Authorize for code报错:AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '2385e6be-54f6-4b1e-ade6-bcc705563fac'.
已经在Azure Portal里配置相应的URI

已经阅读须知并且改了权限,但是仍然报这个错误。 <details> <summary>折叠图片</summary> ![image](https://user-images.githubusercontent.com/25716090/122339793-14f9c000-cf74-11eb-86a6-356dc13c38b2.png) </details> 已经通过描述的方法获取到了两个token,但是输入以后仍然无法使用 <details> <summary>折叠图片</summary> ![image](https://user-images.githubusercontent.com/25716090/122340212-96515280-cf74-11eb-9bb8-62c71292acf1.png) ![image](https://user-images.githubusercontent.com/25716090/122340534-f6e08f80-cf74-11eb-88ad-0588a2b9b775.png) </details> 使用的是vultr的vps,也不会存在无法访问GitHub的问题 在手动创建token.php以后报错消失但是变白屏,是不是可以通过手动修改token.php的方法来避开报错? 补充:在使用小工具microsoft-graph-api-auth获取token时,于步骤4. Authorize for code报错:AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '2385e6be-54f6-4b1e-ade6-bcc705563fac'. 已经在Azure Portal里配置相应的URI
BottleSome commented 2021-06-17 14:13:01 +08:00 (Migrated from github.com)

手动修改token按理来说效果差不多
不过你的目录内容似乎有点乱
建议新建一个空白目录,只放odproxy.php , index.php , template.html
配置后再试试

手动修改token按理来说效果差不多 不过你的目录内容似乎有点乱 建议新建一个空白目录,只放odproxy.php , index.php , template.html 配置后再试试
kcn3388 commented 2021-06-17 14:18:39 +08:00 (Migrated from github.com)

依旧报错
image
data文件夹能够成功创建,应该不是权限的问题

依旧报错 ![image](https://user-images.githubusercontent.com/25716090/122342178-dfa2a180-cf76-11eb-93a9-9b89d1600b9f.png) data文件夹能够成功创建,应该不是权限的问题
BottleSome commented 2021-06-17 14:18:42 +08:00 (Migrated from github.com)

记得打开php报错,这个时候需要些报错信息

记得打开php报错,这个时候需要些报错信息
kcn3388 commented 2021-06-17 14:24:15 +08:00 (Migrated from github.com)

image
已经开启PHP报错

![image](https://user-images.githubusercontent.com/25716090/122342873-ad457400-cf77-11eb-8a91-18a438d93c6f.png) 已经开启PHP报错
BottleSome commented 2021-06-17 14:28:05 +08:00 (Migrated from github.com)

你用的是heymind的小工具获取的token还是beetcb的
heymind的那个已经好久没有维护了
如果最后一步出错了说不定有些问题
在redirectURL验证上

你用的是heymind的小工具获取的token还是beetcb的 heymind的那个已经好久没有维护了 如果最后一步出错了说不定有些问题 在redirectURL验证上
kcn3388 commented 2021-06-17 14:30:18 +08:00 (Migrated from github.com)

你用的是heymind的小工具获取的token还是beetcb的

beetcb
已经在返回的json里面看到了accesstoken了

heymind 的小工具报如下错误:
于步骤4. Authorize for code报错:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '2385e6be-54f6-4b1e-ade6-bcc705563fac'.
已经在Azure Portal里配置相应的URI

> 你用的是heymind的小工具获取的token还是beetcb的 beetcb 已经在返回的json里面看到了accesstoken了 heymind 的小工具报如下错误: 于步骤4. Authorize for code报错: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '2385e6be-54f6-4b1e-ade6-bcc705563fac'. 已经在Azure Portal里配置相应的URI
BottleSome commented 2021-06-17 14:33:53 +08:00 (Migrated from github.com)

beetcb那个可以用的话就无所谓了,
现在填入配置后还是空白页吗
还有就是我印象中errorreporting E_前缀是忽略对应报错吧

beetcb那个可以用的话就无所谓了, 现在填入配置后还是空白页吗 还有就是我印象中errorreporting E_前缀是忽略对应报错吧
kcn3388 commented 2021-06-17 14:34:57 +08:00 (Migrated from github.com)

beetcb那个可以用的话就无所谓了,
现在填入配置后还是空白页吗
还有就是我印象中errorreporting E_前缀是忽略对应报错吧

填入refresh_token是报Failed to get accesstoken. Maybe refresh_token expired.这个错误,自己创建token.php是空白

> beetcb那个可以用的话就无所谓了, > 现在填入配置后还是空白页吗 > 还有就是我印象中errorreporting E_前缀是忽略对应报错吧 填入refresh_token是报Failed to get accesstoken. Maybe refresh_token expired.这个错误,自己创建token.php是空白
BottleSome commented 2021-06-17 14:37:17 +08:00 (Migrated from github.com)

beetcb那个可以用的话就无所谓了,
现在填入配置后还是空白页吗
还有就是我印象中errorreporting E_前缀是忽略对应报错吧

填入refresh_token是报Failed to get accesstoken. Maybe refresh_token expired.这个错误,自己创建token.php是空白

这个错误是程序本身输出的,不是php报错
errorreporting改成E_ALL试一下

> > beetcb那个可以用的话就无所谓了, > > 现在填入配置后还是空白页吗 > > 还有就是我印象中errorreporting E_前缀是忽略对应报错吧 > > 填入refresh_token是报Failed to get accesstoken. Maybe refresh_token expired.这个错误,自己创建token.php是空白 这个错误是程序本身输出的,不是php报错 errorreporting改成E_ALL试一下
BottleSome commented 2021-06-17 14:41:06 +08:00 (Migrated from github.com)

实在不行只能在203行后面追加一行
echo $resp;输出请求返回内容看看情况了

实在不行只能在203行后面追加一行 ```echo $resp;```输出请求返回内容看看情况了
kcn3388 commented 2021-06-17 14:45:24 +08:00 (Migrated from github.com)

实在不行只能在203行后面追加一行
echo $resp;输出请求返回内容看看情况了

还是一样,只显示上面的错误

> 实在不行只能在203行后面追加一行 > `echo $resp;`输出请求返回内容看看情况了 还是一样,只显示上面的错误
BottleSome commented 2021-06-17 14:48:30 +08:00 (Migrated from github.com)

实在不行只能在203行后面追加一行
echo $resp;输出请求返回内容看看情况了

还是一样,只显示上面的错误

你的php环境是怎么安装的,直接手动编译还是一键安装包
我有点怀疑是openssl问题

> > 实在不行只能在203行后面追加一行 > > `echo $resp;`输出请求返回内容看看情况了 > > 还是一样,只显示上面的错误 你的php环境是怎么安装的,直接手动编译还是一键安装包 我有点怀疑是openssl问题
kcn3388 commented 2021-06-17 14:50:11 +08:00 (Migrated from github.com)

实在不行只能在203行后面追加一行
echo $resp;输出请求返回内容看看情况了

还是一样,只显示上面的错误

你的php环境是怎么安装的,直接手动编译还是一键安装包
我有点怀疑是openssl问题

用的bt panel的一键安装

> > > 实在不行只能在203行后面追加一行 > > > `echo $resp;`输出请求返回内容看看情况了 > > > > > > 还是一样,只显示上面的错误 > > 你的php环境是怎么安装的,直接手动编译还是一键安装包 > 我有点怀疑是openssl问题 用的bt panel的一键安装
BottleSome commented 2021-06-17 14:58:03 +08:00 (Migrated from github.com)

改一下128行的$opts试试
原来是:

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		)
	);

改成

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		),
                'ssl' => array(
            'verify_peer'=>false,
            'verify_peer_name'=>false,
        )
	);

抱歉我现在在外面打字不太方便

改一下128行的$opts试试 原来是: ``` $opts = array( 'http' => array( 'method' => $method, 'header' => $head, 'timeout' => 15 * 60, // 超时时间(单位:s) 'content' => $rqcontent ) ); ``` 改成 ``` $opts = array( 'http' => array( 'method' => $method, 'header' => $head, 'timeout' => 15 * 60, // 超时时间(单位:s) 'content' => $rqcontent ), 'ssl' => array( 'verify_peer'=>false, 'verify_peer_name'=>false, ) ); ``` 抱歉我现在在外面打字不太方便
kcn3388 commented 2021-06-17 15:03:50 +08:00 (Migrated from github.com)

改一下128行的$opts试试
原来是:

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		)
	);

改成

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		),
                'ssl' => array(
            'verify_peer'=>false,
            'verify_peer_name'=>false,
        )
	);

抱歉我现在在外面打字不太方便

ok了,麻烦你啦

> 改一下128行的$opts试试 > 原来是: > > ``` > $opts = array( > 'http' => array( > 'method' => $method, > 'header' => $head, > 'timeout' => 15 * 60, // 超时时间(单位:s) > 'content' => $rqcontent > ) > ); > ``` > > 改成 > > ``` > $opts = array( > 'http' => array( > 'method' => $method, > 'header' => $head, > 'timeout' => 15 * 60, // 超时时间(单位:s) > 'content' => $rqcontent > ), > 'ssl' => array( > 'verify_peer'=>false, > 'verify_peer_name'=>false, > ) > ); > ``` > > 抱歉我现在在外面打字不太方便 ok了,麻烦你啦
BottleSome commented 2021-06-17 15:05:55 +08:00 (Migrated from github.com)

改一下128行的$opts试试
原来是:

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		)
	);

改成

$opts = array(
		'http' => array(
			'method' => $method,
			'header' => $head,
			'timeout' => 15 * 60, // 超时时间(单位:s)
			'content' => $rqcontent
		),
                'ssl' => array(
            'verify_peer'=>false,
            'verify_peer_name'=>false,
        )
	);

抱歉我现在在外面打字不太方便

ok了,麻烦你啦

没事,这个地方也是我疏忽了,稍后我会修复一下,解决了就好

> > 改一下128行的$opts试试 > > 原来是: > > ``` > > $opts = array( > > 'http' => array( > > 'method' => $method, > > 'header' => $head, > > 'timeout' => 15 * 60, // 超时时间(单位:s) > > 'content' => $rqcontent > > ) > > ); > > ``` > > > > > > > > > > > > > > > > > > > > > > > > 改成 > > ``` > > $opts = array( > > 'http' => array( > > 'method' => $method, > > 'header' => $head, > > 'timeout' => 15 * 60, // 超时时间(单位:s) > > 'content' => $rqcontent > > ), > > 'ssl' => array( > > 'verify_peer'=>false, > > 'verify_peer_name'=>false, > > ) > > ); > > ``` > > > > > > > > > > > > > > > > > > > > > > > > 抱歉我现在在外面打字不太方便 > > ok了,麻烦你啦 没事,这个地方也是我疏忽了,稍后我会修复一下,解决了就好
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SomeBottle/OdIndex#15
No description provided.