Gmail Postmaster Tools Setup
We introduced Google Oauth2 to gather user's Google's Postmaster stats.
First, login to Google Cloud APIs & Services and follow these steps:
https://console.cloud.google.com/apis/dashboard
- Select Auth Consent Screen on left menu
![](https://files.readme.io/f2d227a-image.png)
- Select External
![](https://files.readme.io/ad47535-image.png)
- Choose an App Name, fill the User Support Email and Developer contact, then press Save and Continue
![](https://files.readme.io/825d23d-image.png)
![](https://files.readme.io/9a61a2f-image.png)
- Click Add or Remove Scopes
![](https://files.readme.io/a092c34-image.png)
- Manually add this scope, press Update, then Save and Continue.
https://www.googleapis.com/auth/postmaster.readonly
![](https://files.readme.io/a8340d1-image.png)
- Click Add Users, add your email address and press Add, then Save and Continue.
![](https://files.readme.io/4560c94-image.png)
Next, we need to setup credentials:
- Select Credentials on the left menu, then 'Create Credentials' and choose 'OAuth client ID'
![](https://files.readme.io/4bd9fe6-image.png)
- Choose 'Web application' as your Application Type
![](https://files.readme.io/3b945e2-image.png)
- Populate the Authorized JavaScript origins
https://your-optipub-instance.app.optipub.com
![](https://files.readme.io/10cb192-image.png)
- Populate the Authorized redirect URI
https://your-optipub-instance.app.optipub.com/admin/settings/integrations/auth-code
![](https://files.readme.io/8eae245-Screenshot_2023-06-28_at_5.00.50_PM.png)
- After pressing create you will be displayed an 'OAuth client created' with your Client ID and Secret.
- Press 'Download JSON' and save the file for later.
The last thing to do in do in Google is to enable the new service you created:
- Select 'Enabled APIs & services' from the left menu and then '+ ENABLE API AND SERVICES'
![](https://files.readme.io/c18df1d-image.png)
- Next search the API Library for 'Postmaster' and select the only result
- Finally, press Enable
![](https://files.readme.io/8ac23b7-image.png)
Finally, you will need to import the JSON configuration file you downloaded earlier into OptiPub:
- Navigate to Admin -> System Settings -> Integrations and press Add on Google OAuth2 Cloud API
![](https://files.readme.io/19a648b-image.png)
- Press the import button the top right to import your config file and then press Save.
![](https://files.readme.io/a542317-image.png)
- Finally, press 'Connect' on the Gmail Postmaster Tools integration
![](https://files.readme.io/2cbca91-image.png)
You should seeing Gmail Postmaster Tools data collecting in your OptiPub account soon!
Updated 8 months ago