Hi,
I would like to get the name of the user whose connected, in GDrive Cloud.
With DropBox, i found the method named GetAccountInfo, and I used AdvDropBox.Info.UserName.
But with GDrive, there no such method.
I wrote something like this, but i must put Token_Access in public declaration, in CloudBase:
url:='https://www.googleapis.com/drive/v2/about/?access_token=' + Storage.Token_Access;
o := Storage.GetJSONObject(url);
if Assigned(o) then
begin
try
IdentConnect := Storage.GetJSONProp(o,'name');
finally
o.Free;
end;
end;
Is it an easier way to obtain username?
thanks