We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
自己尝试之后找到的办法 Microsoft Azure -> Manage Azure Active Directory -> App registrations -> new registration
需要替换的就是 /utils/static.py 中 Application (client) ID, Redirect URIs, Client Secret 三个参数, Client ID 在 App overview 中查看; 在 Certificates & secrets -> new client secret ,创建了client secret 下面是 redirect uri 获取,注册好app之后,
/utils/static.py
Application (client) ID
Redirect URIs
Client Secret
http://localhost:5000/getAToken
https://ip:5000/getAToken
app.py
app.run(port=8090)
onedrivecmd/utils/static.py
cd 虚拟环境文件夹
find ./ -name onedrivecmd
find ./ -name onedrivesdk
params = "client_id=" + str(self.client_id) + '&redirect_uri=' + str(redirect_uri) +'&client_secret=' + str(client_secret) + '&code=' + str(code) +'&grant_type=authorization_code'
然后根据作者的 onedrivecmd init ……就可以使用了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
自己尝试之后找到的办法
Microsoft Azure
-> Manage Azure Active Directory
-> App registrations
-> new registration
需要替换的就是
/utils/static.py
中Application (client) ID
,Redirect URIs
,Client Secret
三个参数,Client ID 在 App overview 中查看; 在 Certificates & secrets -> new client secret ,创建了client secret
下面是 redirect uri 获取,注册好app之后,
点Web app之后找到一个 quick start -> python -> Step 2 download the code sample,解压后是一个简单的 flask 服务
在服务器后台挂起服务 nohup python app.py &
如果在自己 pc/mac 上启动 onedrivecmd 和flask服务,redirect URI 是
http://localhost:5000/getAToken
如果在服务器上,redirect URI 是
https://ip:5000/getAToken
,ip是服务器ip,如果服务器需要转发还得nginx转发到外网ip,注意是https不是http如果端口被占用,需要修改端口,那么
app.py
修改最后一行app.run(port=8090)
,这里我设置端口8090,可以是其他没有占用端口onedrivecmd/utils/static.py
中 client_id_normal ,client_secret_normal, redirect_uriconda env list 查看虚拟环境安装地址,
cd 虚拟环境文件夹
, 然后用find ./ -name onedrivecmd
a. 找到源码位置
find ./ -name onedrivesdk
b. 发现由于onedrivesdk发送参数应该是string导致了错误,需要修改 onedrivesdk/auth_provider.py 第194行添上
然后根据作者的 onedrivecmd init ……就可以使用了
The text was updated successfully, but these errors were encountered: