Muhammad Umar
Muhammad Umar

Reputation: 11782

Url for oneDrive download file not accepting AccessToken

I am trying to make a download url for oneDrive REST API

NSString *downloadUrl = [NSString stringWithFormat:@"https://apis.live.net/v5.0/%@/content?suppress_redirects=true?access_token=%@",
                                 [file objectForKey:@"id"],
                                 [ApiManager sharedInstance].liveClient.session.accessToken
                                 ];

Here is my code, however its giving me error that access token is not found. If i remove suppress redirects it works and generates a url to download. However i want to skip this redirect url.

The query is explained in here

https://msdn.microsoft.com/en-us/library/office/dn659726.aspx

How can i fix this issue?

Upvotes: 0

Views: 273

Answers (1)

Brad
Brad

Reputation: 4192

Change the second ? to an & and it should work. I'd also suggest taking a look at the new API (http://dev.onedrive.com) as it's more likely to get new features going forward.

Upvotes: 1

Related Questions