External storage Error: redirect_uri_mismatch

Following the documentation to set up Google Drive external storage for nextcloud version 12, I’m getting the error page
(just replaced real domain name with mydomain.com:portnumber)

  1. That’s an error.
    Error: redirect_uri_mismatch

The redirect URI in the request, https://mydomain.com:portnumber/index.php/settings/admin/externalstorages, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/1043786480473-nmisoino3g2q5f5huvd1vbvoj73orp12.apps.googleusercontent.com?project=1043786480473 to update the authorized redirect URIs.

On Google API everything is set up correctly:

redirect urls:

https://mydomain.com:portnumber/nextcloud/index.php/settings/personal/
https://mydomain.com:portnumber/nextcloud/index.php/personal/
https://mydomain.com:portnumber/nextcloud/index.php/settings/admin/externalstorages
https://mydomain.com:portnumber/nextcloud/settings/admin/externalstorages

Any idea please?

can be deleted, solved

Facing the same problem.

How did you solve?

Had the same problem.
additionally to the redirect URIs, you have to add your full URL to your cloud to the “authorized java-script sources”