1.「Google API OAuth2.0のアクセストークン&リフレッシュトークン取得手順 2017年2月版」のrefresh_tokenが取得できるとこまで進める。

Google API OAuth2.0のアクセストークン&リフレッシュトークン取得手順 2017年2月版 - Qiita

2.以下を実行してアクセストークンを取得する。

$ curl -v -X POST 'https://accounts.google.com/o/oauth2/token' -d 'grant_type=refresh_token&refresh_token={リフレッシュトークン}&client_id={クライアントID}.apps.googleusercontent.com&client_secret={クライアントシークレット}&redirect_uri=https://onimomo-test.firebaseapp.com/__/auth/handler'

{
  "access_token" : "ya29.XXXXXXXXXXXX",
  "expires_in" : 3600,
  "token_type" : "Bearer"
* Connection #0 to host accounts.google.com left intact
}

3.アクセストークンを使用してAPIを実行する

curl https://www.googleapis.com/androidpublisher/v1.1/applications/jp.etimestech.onimomo/inapp/{アプリのパッケージネーム}/purchases/{設定した商品名}?access_token={アクセストークン}

4.以降、アクセストークンが切れたら”2”からやり直す

参考