Open the Gmail API page (make sure your new project is picked at the top) and click Enable.
Open Google Auth Platform and click Get started. App name: Gmail Cleaner, pick your email, choose External, finish.
In the left menu click Audience, under Test users click Add users, and add your own Gmail address.
In the left menu click Clients → Create client. Type: Web application. Under Authorised JavaScript origins click Add URI and paste:
Then under Authorised redirect URIs click Add URI and paste: On a phone: tap Copy here, switch back to the Google tab, and paste. Click Create.
Copy the Client ID it shows (it ends in .apps.googleusercontent.com) and paste it here:
When you sign in, Google will warn "Google hasn't verified this app". That's normal because it's your own private app. Click Continue.
Ready
Sign in with the Gmail account you want to clean. Nothing is sent anywhere except straight between this page and Google.