-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOAUTH.notes.txt
More file actions
76 lines (45 loc) · 1.62 KB
/
Copy pathOAUTH.notes.txt
File metadata and controls
76 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
2. Skip Sensitive Scope Verification (Temporarily)
Sensitive scopes (e.g., .../auth/drive) normally require app verification.
Workaround:
Keep your app in "Testing" mode (under OAuth consent screen settings).
Add your test account(s) as Test Users.
Google won’t enforce verification until you publish publicly.
3. Disable "Subdomain Matching" for Redirect URIs
To avoid URI conflicts:
In Google Cloud Console > OAuth 2.0 Client IDs > Your Client, add:
text
http://localhost
http://localhost:8080
Uncheck "Enforce strict domain verification" (if shown).
step 4?
4. Use access_type=offline & prompt=consent
In your OAuth request URL, force a refresh token and re-consent:
How to Widen Scopes (If Needed)
If you hit "insufficient permissions" errors:
Check required scopes in your appsscript.json:
json
{
"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets", "https://www.googleapis.com/auth/drive"]
}
IMPORTANT>>
1. appsscript.json and clasp
Purpose:
appsscript.json is the manifest file for Apps Script projects. It defines:
OAuth scopes (oauthScopes)
Add-on metadata (if publishing to Workspace Marketplace)
Script dependencies (libraries, APIs)
Example:
json
{
"timeZone": "America/New_York",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/script.external_request"
],
"dependencies": {},
"exceptionLogging": "STACKDRIVER"
}
Used by clasp:
When you run clasp create or clasp pull, this file is generated/modified.
clasp push deploys your code alongside this manifest to Apps Script.
Required for setting OAuth scopes during development.