跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 求助大佬们,One Drive 的API到底怎么填啊,每次一个小时就断
未分類
8 4 月 2020

求助大佬们,One Drive 的API到底怎么填啊,每次一个小时就断

beiona 大佬有话说 : 2020-3-27 00:33:43

求助大佬们,One Drive 的API到底怎么填啊,每次一个小时就断

本帖最后由 beiona 于 2020-3-27 00:43 编辑

{"access_token":"eyJ0e。。。。IAA","expiry":"2020-03-27T00:22:30.9278491+08:00"}
每次这个时间一过,盘就掉了
再挂载,就报错
2020/03/27 00:29:50 Failed to create file system for "api:": failed to get root: Get https://graph.microsoft.com/v1.0/drives/b!Ip5RNY6ahkOJN585pjCCGbgX-wScB3lGpkvAbBSvvNFgfGG4Lb3USaeF0zxEqpO1/root: oauth2: cannot fetch token: 401 Unauthorized
Response: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.rnTrace ID: 592cb690-c3e8-496b-81aa-427b50653900rnCorrelation ID: 0e366b8a-f072-40f3-9dd0-cd654e7a3a78rnTimestamp: 2020-03-26 16:29:49Z","error_codes":,"timestamp":"2020-03-26 16:29:49Z","trace_id":"592cb690-c3e8-496b-81aa-427b50653900","correlation_id":"0e366b8a-f072-40f3-9dd0-cd654e7a3a78","error_uri":"https://login.microsoftonline.com/error?code=7000215"}
https://cdn.jsdelivr.net/gh/beiona/pic/master/luntanfatieqiuzhuapi/11.PNG

我的操作顺序如下,请大佬帮忙看看

1.https://portal.azure.com/应用注册,选的第三项
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/01.PNG

2.重定向url,选的web,http://localhost:53682/
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/02.PNG

3.添加客户端密码,截止日期,从不
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/03.PNG

4.API权限,Microsoft Graph,
委托的权限,offline_access和file里面7项
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/04.PNG
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/05.PNG
应用程序权限,file里面2项
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/06.PNG

5.管理员授权
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/07.PNG

6.Centos上新建rclone,n,名字,23
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/08.PNG

7.Centos上填刚刚注册的Client_id和Client_secret
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/09.PNG

8.电脑上rclone authorize "onedrive",得到token
https://cdn.jsdelivr.net/gh/beiona/pic/luntanfatieqiuzhuapi/10.PNG

9.Centos上复制token,1,0,y,y,q

10.Centos上挂载,rclone mount api: /api –allow-other –allow-non-empty –vfs-cache-mode writes

在宝塔的定时任务里,写了一个定时复制文件进去,cp -f /api.txt /api
但是每次一个小时候就断了,折腾了两天也没搞定。
还请大佬们指点

beiona 大佬有话说 : 2020-3-27 09:14:39

继续求助

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具