Solved

Google: Authorization - Error - redirect_uri_mismatch

  • 8 April 2022
  • 3 replies
  • 1468 views

I am in Authorization Code Flow to get access token. i tried to sign in with Google but it gave me an error: "Authorization Error Error 400: redirect_uri_mismatch You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cloud Console." so How to setup correct redirect URL for Google? or what should i do to solve it?. Thanks

screen-shot-2022-04-07-at-111013.png

icon

Best answer by Anonymous 8 April 2022, 14:34

View original

3 replies

Could you share more details on what you are doing?
In general, OAuth works where there is an OAuth Authorization Server that will authorize the app and provide the access token that can be used to fetch resources from the Resource Server.

In this case, the Authorization Server is the RingCentral Authorization Server server.
This is how you can authorize against the RingCentral Authorization Server
https://developers.ringcentral.com/guide/authentication/quick-start#javascript

Hi @Ho Trung
The "Sign in with Google" on the developers.ringcentral.com is for signing in to the portal and not for your app to be able to consume the API.
When you need to consume any RingCentral API, you need to get an access token
For getting the access token, there are multiple ways and one of them is OAuth.
What that means is that you need an app that will implement auth flow as explained here
https://developers.ringcentral.com/guide/authentication/quick-start#javascriptdepending on what language you are writing to code your app.
After implementing authentication, you will be the access token and you can use that to fetch resources.
You should be able to find examples in the guide https://developers.ringcentral.com/guide

Hope this is helpful.

Thanks,

Yatin

Hi @Yatin Gera
Ok I got it . Thank you a lot

Reply