Retrieving Refresh Token of Google Play

Hi community, I need your help! I have been working on it for days and
have read a couple of tutorials and tried a couple of methods but none
of them worked out.

I am using Soomla plugin for the In-App Purchase.
In Unity, I click Window->Soomla->Edit Settings, and then in the Android
Settings->Google Play->Receipt Validation, there are three items I need
to fill in: Client ID, Client Secret and Refresh Token. To obtain them, I
create an API account in the Google Developer Consoles. Following the steps
mentioned in

I successfully obtain the Client ID and Client Secret. To obtain the Refresh Token,
I need to send a POST request to URL https://www.googleapis.com/oauth2/v3/token
with a set of parameters, the aforementioned webpage said that the actual request
might look like

POST /oauth2/v3/token HTTP/1.1
Host: www.googleapis.com
Content-Type: application/x-www-form-urlencoded

code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7&
client_id=8819981768.apps.googleusercontent.com&
client_secret={client_secret}&
redirect_uri=https://oauth2-login-demo.appspot.com/code&
grant_type=authorization_code

I have every parameters required, but I have no clue from where I can send a POST
request. In the address bar of my browser? In the terminal? In a webpage that handle
POST request?

Please help! Really! Many Thanks!!!

cheers
KY

  1. Google for “post request”.
  2. Click on the 4th result: Hurl.it — Make HTTP Requests.

There’s no other way to make post requests other than per script uploaded on a server, or a website that does it for you.

Thanks so much Baroni.
It seems promising to me.
May I further ask a question based
on this webpage?

What are authentication and header?
A rough example would be appreciated!
Thanks!

You don’t need them. All you need is this (see attached image), where the code parameter is the key at the end of the url after opening

2218502--147700--POST.JPG

1 Like

Hi,
sorry to bump the thread, but i’m quite lost here…
about that redirect uri, do i need to have my own server in order to create the redirect uri, or is there any other way to do it?