@@ -15,3 +15,75 @@ If you do not have an account yet, here is the description: [Registering to GCP]
15
15
You can enable the APIs for the services you want to use based on this description:
16
16
[ Enable APIs on GCP] ( enable-gcp-apis.md )
17
17
18
+ ## 4. Create a "OAuth content screen"
19
+
20
+ - In gcp console navigate to "APIs & Services" > "OAuth Content Screen"
21
+ - Please fill in the required information. If you are using it for your own purposes,
22
+ there is no need to fill in all the information, as you will only be using it in test mode.
23
+
24
+ "SAVE AND CONTINUE" button at the bottom of the page.
25
+ - Nothing needs to be filled in on the Scopes page.
26
+
27
+ "SAVE AND CONTINUE" button at the bottom of the page.
28
+ - On the test user page, add the accounts for which you want to grant access.
29
+ * Remember, you can only add accounts that originate from Gmail or Google Workspace.*
30
+
31
+ "SAVE AND CONTINUE" button at the bottom of the page.
32
+ - At the bottom of the summary page, the Oauth screen is ready with the BACK TO DASHBOARD button.
33
+
34
+ On the OAuth Consent Screen, you will have the option to add additional test users in the future.
35
+
36
+ This description does not cover the publishing of the OAuth Consent Screen.
37
+
38
+ ## 5. Create a credentials
39
+
40
+ - In gcp console navigate to "APIs & Services" > "Credentials"
41
+ - The "+ CREATE CREDENTIALS" button at the top of the page.
42
+ - In the select, choose "OAuth client ID".
43
+ - In "Application Type", choose "Desktop App".
44
+ - Specify the name of the application, e.g. "gwbackupy"
45
+ - Click to "CREATE" button
46
+ - In the pop-up window, click on the "DOWNLOAD JSON" button to download the credentials JSON file.
47
+
48
+ ** Handle the JSON file securely. Do not share it with anyone and do not make it available on the internet.**
49
+ - Copy the JSON file to a location where gwbackupy also has access and can specify its path as a startup parameter.
50
+
51
+ ## 6. First run of gwbackupy
52
+
53
+ Run in CLI (terminal):
54
+ ``` bash
55
+ gwbackupy --credentials-filepath < file path of credentials JSON> gmail backup --email < email address of backup>
56
+ ```
57
+
58
+ e.g.:
59
+
60
+ ``` bash
61
+ gwbackupy --credentials-filepath .tmp/gwbackupy-test-oauth-client_secret_368702422762-84sf6lcl949ipohkho8qtumceatudlre.apps.googleusercontent.com.json gmail backup --email
[email protected]
62
+ ```
63
+
64
+ If the parameters are correct, you will receive the following lines.
65
+
66
+ > Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth ...
67
+
68
+ If the system is able to, it will automatically start a browser with the link.
69
+ * Please always check that the browser has started in the correct profile (in case of multiple profile usage).*
70
+
71
+ In the browser window, select the email account specified.
72
+
73
+ On the following page, click the "Continue" button.
74
+ * You will only receive the security warning if the OAuth Consent Screen is being used in test mode or by a test account.*
75
+
76
+ ![ ] ( images/oauth-screen-continue.png )
77
+
78
+ On the next screen, click "Continue" again to allow the application full access to the gmail account.
79
+
80
+ ![ ] ( images/oauth-screen-grant-access.png )
81
+
82
+ If successful, you will receive the following message in the browser:
83
+
84
+ > The authentication flow has completed. You may close this window.
85
+
86
+ Meanwhile, gwbackupy has already started in the background and has begun saving the emails found in the account.
87
+
88
+ * This step is required for each account. Additionally, it may occur that the Google servers require
89
+ it again due to infrequent use or other security considerations.*
0 commit comments