The Error 400: redirect_uri_mismatch is an error that can likely occur during the generation of the Google Authentication code if OAuth settings are not properly configured.
This error signifies that your app is not set to a “Desktop Application” which is actually the requirement while configuring OAuth details as per step 10 within the guide here.
In order to resolve the error, you will need to first access your app in Google Developers Console and carry out the following:
i) Delete your current client ID
ii) Select Credentials from the left-hand menu, click +CREATE CREDENTIALS, then skip the setup wizard by selecting client ID.
iii) Select the option OAuth Client ID
iv) On this next screen, please ensure the Application type as “Desktop App” and ensure NOT to select “Web application” .
v) Enter a name for the application (such as “Simple Calendar Client ID”) then click Create. Note: It may take 5 minutes to a few hours for settings to take effect.
vi) You can then copy your new Client ID and Client secret
vii) Next, navigate to the Calendar > Settings section within your WordPress dashboard, and on the “Event Sources” section, remove your previously added Google OAuth Client ID, Google OAuth Client Secret and Authentication code.
Once this is done, save your changes.
viii) One at a time copy and paste the Client ID and the Client secret values from the Google Developers Console and paste them in the respective fields within the calendar settings. Then click Save Changes.
ix) Click the “Authenticate With Google” button. A popup will appear for you to select your gmail account (if you don’t see any, check if your browser is suppressing those). Follow the instructions in the popup and authorize your own application with your Google account.
x) By clicking on Allow, Google will return an auth code which you can paste in the Authentication Code field. Then click Save Changes.
Note: If you are not currently logged in into Google, you must log in first. You are going to authorize Simple Calendar to use calendars of the Google user that is currently logged in. If you share your WordPress installation with other users, they won’t be able to control your Google account but if they have access rights to Simple Calendar they might control or read your calendars or calendars belonging to the user who has authorized Simple Calendar.