Ich bin auf der Suche Dateien auflisten, die mit mir auf Microsoft Onedrive für das Geschäft mit dem Python Microsoft Onedrive SDK (Microsoft Onedrive-Python-sdk)Liste freigegebenen Dateien Microsoft Onedrive für Unternehmen
ich in der Lage freigegeben wurden, haben erfolgreich authentifiziert und gewesen zur Liste Dateien, die ich den folgenden Code habe mit
import onedrivesdk
from onedrivesdk.helpers import GetAuthCodeServer
from onedrivesdk.helpers.resource_discovery import ResourceDiscoveryRequest
redirect_uri = 'http://localhost:8080'
client_id = your_client_id
client_secret = your_client_secret
discovery_uri = 'https://api.office.com/discovery/'
auth_server_url='https://login.microsoftonline.com/common/oauth2/authorize'
auth_token_url='https://login.microsoftonline.com/common/oauth2/token'
http = onedrivesdk.HttpProvider()
auth = onedrivesdk.AuthProvider(http,
client_id,
auth_server_url=auth_server_url,
auth_token_url=auth_token_url)
auth_url = auth.get_auth_url(redirect_uri)
code = GetAuthCodeServer.get_auth_code(auth_url, redirect_uri)
auth.authenticate(code, redirect_uri, client_secret, resource=discovery_uri)
# If you have access to more than one service, you'll need to decide
# which ServiceInfo to use instead of just using the first one, as below.
service_info = ResourceDiscoveryRequest().get_service_info(auth.access_token)[0]
auth.redeem_refresh_token(service_info.service_resource_id)
client = onedrivesdk.OneDriveClient(service_info.service_resource_id + '/_api/v2.0/', auth, http)
#get the top three elements of root, leaving the next page for more elements
collection = client.item(drive='me', id='root').children.request(top=3).get()
# print files
print collection
aber ich bin nicht sicher, wie die Dateien anfordern, die mit mir geteilt hat, habe ich Referenzen in der Microsoft Onedrive API gesehen folgende Anfrage zu verwenden , aber ich bin nicht sicher, wie man den Anruf
macht 10GET /drive/view.sharedWithMe
Jede Hilfe wäre
Vielen Dank für die schnelle Antwort, das war ein absoluter Genuss! – user29184827194701
@ user29184827194701 Wo können Sie die Datei später herunterladen? – Sid29