Reputation: 103
Okay, so I used
WebTokenRequest webTokenRequest =
new WebTokenRequest(Provider, Scope, ClientID);
WebTokenRequestResult _result =
await WebAuthenticationCoreManager.RequestTokenAsync(webTokenRequest);
string id = _result.ResponseData[0].WebAccount.ID;
string token = _result.ResponseData[0].Token;
...to get the the token needed to access the user's OneDrive account. The sign in went well and all, but now what API am I to use to start accessing OneDrive with that token and key I received?
There is absolutely NO documentation to help novices out beyond this point. Whatsoever. In fact, there isn't a human that discusses anything beyond getting the token. All of the documentation and videos simply tell you how to log the users in and get the token, etc.. But now I need to start working with the OneDrive account of the user who I just logged into my app... Any help on where to begin. The ONLY thing I need is a starting point. I will read and learn for myself at that point. Thanks.
Upvotes: 0
Views: 122
Reputation: 454
If your goal is to work with the OneDrive SDK you can use this example code to initialize a OneDriveClient using the access token you retrieved. After retrieving an authenticated client you might want to look at the SDK documentation for some of the high-level concepts of working with the SDK. For the most part, the calling patterns closely mirror the API URL calling patterns.
If your goal isn't to work with the SDK you can craft calls against the API endpoint directly. You'll want to add the token to the Authorization header as "Authorization: bearer token". Take a look at the API documentation for the specific functionality of the OneDrive API.
Upvotes: 1