So I have followed the erpnext documentation on setting up Google Settings for Google Calendar and Google Drive
However, upon authorisation of access the error 400 appears Error: redirect_uri_mismatch
The redirect URI set in google cloud platform is this: http://URL RETRACTED?cmd=frappe.integrations.doctype.google_drive.google_drive.google_callback
The redirect URI appearing in the on the error page however, is very very different: http://URL RETRACTED:8001?cmd=frappe.integrations.doctype.google_drive.google_drive.google_callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/587641976614-tvk20sobndofsk3o39bmpkoqvheci032.apps.googleusercontent.com?project=587641976614
I have retracted the erpnext URL for privacy reasons but please observe the added port :8001 to the URL
This seems to be connected to the concept where any links added in erpnext emails do not work… same port is added automatically although we are not accessing erpnext on that port.