Regenerate Google Refresh Token
Sign into fb-acceptance-tests account
Password is stored in the shared LastPass account. It has 2FA enabled so use one of the backup codes. Regenerate them if required.
View credentials
Go to the Developer Console.
Click on Credentials, and under ‘OAuth 2.0 Client IDs’ you should see the ‘FB Acceptance Tests’ credentials.
Click on that and you will see the Client ID and Client Secret.
Regenerate Refresh Token
Next go to the OAuth Playground. On the right hand side click on the cog icon.
The Oauth flow needs to be “Server-side”, Access type should be “Offline”. Tick the Use your own OAuth Credentials box and then enter the Client ID and Client secret from the previous Credentials page into the fields.
On the left hand side of the screen you will see Step 1 Select & Authorize APIs.
Search for the Gmail V1 API and make sure “https://mail.google.com” is selected.
Click Authorize APIs and you will be presented with a permissions screen.
Click Allow and follow the instructions.
Step 2 is where you generate the tokens.
Click Exchange authorization code for tokens. The Refresh Token is the important one.
You do not need to go to Step 3.
Take a copy of the Refresh Token and add it to the GOOGLE_REFRESH_TOKEN environment variable in CI or on your local machine. You will also need the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from the previous credentials screen.






