【发布时间】:2017-07-15 19:35:01
【问题描述】:
我正在尝试将我的 OneDrive for business 与 Python 一起使用。
我已经安装了 onedrivesdk,现在我正在验证我的 OneDrive
提供的代码如下
import onedrivesdk
redirect_uri = 'http://localhost:8080/'
client_secret = 'your_client_secret'
client_id='your_client_id'
api_base_url='https://api.onedrive.com/v1.0/'
scopes=['wl.signin', 'wl.offline_access', 'onedrive.readwrite']
http_provider = onedrivesdk.HttpProvider()
auth_provider = onedrivesdk.AuthProvider(
http_provider=http_provider,
client_id=client_id,
scopes=scopes)
client = onedrivesdk.OneDriveClient(api_base_url, auth_provider, http_provider)
auth_url = client.auth_provider.get_auth_url(redirect_uri)
我不确定我应该提供什么 client_secret 和 client_id 才能访问我的 OneDrive
我将感谢有关从何处获取上述参数的帮助。
【问题讨论】:
-
收到了吗?
标签: python-3.x sdk oauth-2.0 onedrive