Answers.Body: <p>It turns out I did not have the Gmail API enabled in APIs and Services, despite it appearing in the oAuth Scopes section. Apparently there is no check that an API is enabled when adding it.</p>
  <p><a href="https://i.sstatic.net/EGOp4UZP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EGOp4UZP.png" alt="Gmail Scopes" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-03T23:02:47.890Z
Answers.LastActivityDate: 2024-10-03T23:02:47.890Z
Answers.UserDisplayName: Larry K.
Body: <p>I have not been able to get oAuth to connect to Gmail and am getting <code>Access blocked: This app’s request is invalid</code> <code>Error 400: redirect_uri_mismatch</code> <code>Request details: redirect_uri=https://...org/civicrm/oauth-client/return flowName=GeneralOAuthFlow</code>. This is with CiviCRM 5.50.4 on D9. I got oAuth and Gmail working earlier this year on D7 following <a href="https://civicrm.stackexchange.com/questions/38845/how-can-i-set-up-an-incoming-email-or-bounce-account-on-gmail-with-oauth/38846#38846">Jon G's excellent instructions</a> and am now using the same settings on D9. The only thing I see that seems suspect is that is <code>flowName=GeneralOAuthFlow</code> is added to my configured redirect URI ending in /civicrm/oauth-client/return. I don't know where this is being added from, but it seems to be causing the failure. Thank you.</p>
  
Tags: <google><oauth>
Title: OAuth GMail Access blocked: Error 400: redirect_uri_mismatch
ThreadText: # OAuth GMail Access blocked: Error 400: redirect_uri_mismatch
  
  (Asked by: username_0 on 2024-10-01)
  
  I have not been able to get oAuth to connect to Gmail and am getting `Access blocked: This app’s request is invalid` `Error 400: redirect_uri_mismatch` `Request details: redirect_uri=https://...org/civicrm/oauth-client/return flowName=GeneralOAuthFlow`. This is with CiviCRM 5.50.4 on D9. I got oAuth and Gmail working earlier this year on D7 following [Jon G's excellent instructions](https://civicrm.stackexchange.com/questions/38845/how-can-i-set-up-an-incoming-email-or-bounce-account-on-gmail-with-oauth/38846#38846) and am now using the same settings on D9. The only thing I see that seems suspect is that is `flowName=GeneralOAuthFlow` is added to my configured redirect URI ending in /civicrm/oauth-client/return. I don't know where this is being added from, but it seems to be causing the failure. Thank you.
  
  **Tags:** google, oauth
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-10-03. Score: 1
  
  It turns out I did not have the Gmail API enabled in APIs and Services, despite it appearing in the oAuth Scopes section. Apparently there is no check that an API is enabled when adding it.
  
  [![Gmail Scopes](https://i.sstatic.net/EGOp4UZP.png)](https://i.sstatic.net/EGOp4UZP.png)
  
  
  ---
  
  