Generate code retrieval link
Returns URL for browser authorization
Function FormCodeRetrievalLink(Val ClientID, Val Calendar = True, Val Drive = True, Val Sheets = True) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| ClientID | --id | String | ✔ | Client ID |
| Calendar | --calendar | Boolean | ✖ | Calendar methods permission |
| Drive | --drive | Boolean | ✖ | Drive methods permission |
| Sheets | --sheets | Boolean | ✖ | Sheets methods permission |
Returns: String - Code retrieval link
1C:Enterprise/OneScript code example
ClientID = "345925493105-641q49rl4oflrtr46fkgqf5upiltr4bg.apps.googleusercontent.com";
Result = OPI_GoogleDrive.FormCodeRetrievalLink(ClientID);
- Bash
- CMD/Bat
oint gdrive FormCodeRetrievalLink \
--id "345925493105-641q49rl4oflrtr46fkgqf5upiltr4bg.apps.googleusercontent.com"
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"