I am working on an Android application with Google Play in-app purchases. I also have a server application(JAVA) working in the background. Whenever the user successfully makes a purchase in the app(purchasing is working), the server application should send a request to Google play to verify the purchase.
Google Play is offering the androidpublisher api for that: developers.google.com/android-publisher/getting_started
The problem is the access_token. Whenever I obtain a new access_token(either with the refresh or new token requesting method), it doesn't work, if I try to use the GET method to ask the information from a purchase inapp item from Google play store(https://developers.google.com/android-publisher/v1/purchases/get) -> it always results in error 401(invalid credential) or 403(access not configured).
after endless trying I find out that I only can get the method working with that link: https://developers.google.com/apis-explorer/#p/androidpublisher/v1.1/androidpublisher.inapppurchases.get, and I can only read the valid access_token from there, and only with that token I can get my server application working but only for one hour, after 1 hour I have to do the same step again...
now I really need a proper way to get a valid access_token with my application
I have researched a lot on internet but I couldn't find something useful. I know that I am not the only one with that problem, maybe someone of you guys know what to do or has already experience with that