SkyDrive in Cloud Demo


I try to connect Skydrive (or OneDrive) in the project CloudStorageDemo.

I have the following error:
   "error": {
      "code": "request_token_invalid", 
      "message": "The access token isn't valid."

I create my application in, I put a name, and generate ClientId and ClientSecret that i wrote in APPIDS.INC.
For Callback URL, I create a virtual domain, named in APiSettings, and I wrote, in TAdvSkyDrive.App.CallbackURL, (i put 80 in Callback Port).
Finally, I append a line in hosts file:

Any idea of what I forgot?


Can you please make sure the same CallBack URL is defined in the Live application?

If the problem persists, have you tried using an empty CallBackURL for TAdvSkyDrive (as demonstrated in the Cloud Storage Demo included with the product download)?


Yes, it's the same CallBackURL.

I try to use empty URL in the Live application.
But in CloudCustomWinLive.pas, there's a default CallBackURL.

And this is the GetAuthURL I obtain:

When I put this URL in google Chrome, a blank page appear.

If i remove redirect_uri (to obtain the empty uri as in Live application), it's doesn't work too.

Any idea?

Please do NOT use an empty callback URL, it won't work with an empty callback URL.
Please specify in your Live app settings a valid callback URL.
When a problem persists, please enable logging and send us the generated log file so we can inspect what exactly happens.

ok, i found my error: i forget to put 'Yes', in ApiSettings, for desktop application.

now, it's ok, with empty callback URL.

PS: the component TAdvOneDrive doesn't work: it doesn't use TAdvSkyDrive.DoAuth. But it's ok with TAdvSkyDrive.

Thanks a lot and i apologize for the inconvenience.

I have retested TAdvOneDrive here but can't see an issue with DoAuth. It is calling the inherited method DoAuth from TAdvSkyDrive.

i used TAdvOneDrive component, put clientId and secretKey, and call AdvOneDrive1.DoAuth.

i put a breakpoint in CloudWinLive.pas,  procedure TAdvSkyDrive.DoAuth, line inherited;
but it's doesn't stop.

Delphi XE5, TMSCloudPack Release

I can't see this problem here.  It correctly stops in TAdvSkyDrive.DoAuth and if you look at the code, there shouldn't be any reasons not to stop there.
Are you sure you have a clean setup, i.e. only one & correct version of the TMS Cloud Pack files in your library path

Ok, we found the problem.

Why is there 2 declarations of TAdvOneDrive? one in CloudWinLive.pas and the other in CloudCustomWinLive.pas?
In the project Demo, the first declaration in uses is CloudWinLive. So the inherited is not the good one.
If you remove the uses, and add TAdvOneDrive component, 2 uses are added, but in good order (Custom first).

You're correct. The one in CloudCustomWinLive should be removed. We removed this. Next update will have this fixed.

ok, thanks for your answer