The redirect URI (where the response is returned to) has to be registered in the APIs console, and the error is indicating that you haven’t done that, or haven’t done it correctly.
Go to the console for your project and look under API Access. You should see your client ID
& client secret
there, along with a list of redirect URIs. If the URI you want isn’t listed, click edit settings and add the URI to the list.
Note: Updating the google api console and that change being present can take some time. Generally only a few minutes but sometimes it seems longer.
Add Authorised redirect URIs
- Go to the official website of Google Developer Console.
- Select an existing project for whose credentials you added to the plugin settings page.
- Click on the menu icon and find APIs and services hover over this menu and you will see other options now click on Credentials.
- Now click on your OAuth 2.0 Client ID.
- Check if your Authorised redirect URIs section has the same redirect URI from the Google API Settings of the plugin settings page or not.
- If it’s not there then copy the redirect URI from the plugin Google API Settings page and paste it into the project’s Authorised redirect URIs section.
- Save the settings.
Note: It may take five minutes to a few hours for settings to take effect.