Create service account in Cloud Platform Console
- see Using OAuth 2.0 for Server to Server Applications
- Save the privated key generated
Allow impersonation in Admin Console
Check google-api git repo
read/test/play with samples ...
- npm i google-auth-library
- npm i googleapis
- jwt.pas
- simpleRESClient.pas Simple RESClient Indy based
- gDriveUtils.pas
- sample console projet
{$APPTYPE CONSOLE}
Var GDrive:TrmxGDriveUtils;
begin
ReportMemoryLeaksOnShutdown:=True;
GDrive:=TrmxGDriveUtils.Create;
try GDrive.OnProgress:=procedure (Const aMsg:String) Begin Writeln(aMsg); end;
GDrive.Test;
except on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;