/gDriveCmdLine

Google Drive API

Primary LanguagePascalMIT LicenseMIT

Test JWT server to server google drive API access.

Create service account in Cloud Platform Console

Allow impersonation in Admin Console

see ManageOauthClients

Check google-api git repo

read/test/play with samples ...

Read The Fucking Doc

Start new node project

  • npm i google-auth-library
  • npm i googleapis

Start new pascal project

  • 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;