This can happen when you enter your website URL in the Authorized redirect URIs rather than your Matomo URL (when setting up Google oAuth config client). This needs to be set to your Matomo URL including the query string for example: refer to step 10 in our guide.

Previous FAQ: How do I import Google keywords from multiple protocols/sub-domains into one Matomo website? (using domain property)