Skip to main content

Generate code retrieval link

Returns URL for browser authorization

Function FormCodeRetrievalLink(Val ClientID, Val Calendar = True, Val Drive = True, Val Sheets = True) Export

ParameterCLI optionTypeRequiredDescription
ClientID--idStringClient ID
Calendar--calendarBooleanCalendar methods permission
Drive--driveBooleanDrive methods permission
Sheets--sheetsBooleanSheets methods permission

Returns: String - Code retrieval link

1C:Enterprise/OneScript code example
    ClientID = "345925493105-641q49rl4oflrtr46fkgqf5upiltr4bg.apps.googleusercontent.com";
Result = OPI_GoogleDrive.FormCodeRetrievalLink(ClientID);
    oint gdrive FormCodeRetrievalLink \
--id "345925493105-641q49rl4oflrtr46fkgqf5upiltr4bg.apps.googleusercontent.com"
Result
"https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=345925493105-641q49rl4oflrtr46fkgqf5upiltr4bg.apps.googleusercontent.com&redirect_uri=http://localhost&access_type=offline&scope=https://www.googleapis.com/auth/calendar%20https://www.googleapis.com/auth/drive%20https://www.googleapis.com/auth/spreadsheets"