What Google’s Oauth2 redirect uri to use on the server-side for js and android clients?

Keywords: google-oauth2

Question: 

I'm using server side for getting access_token and refresh_token by sending google access code. Google access code I take from js on the website and from android app.

The problem is on server side:

I can get access_token from server side by sending js access code with redirect_uri="postmessage".

And I can get access_token from server side by sending android access code with redirect_uri="".

Is there one redirect_uri that is ok for both cases?

Answers: