I turn out that google play store stores statistics related data in google cloud. It creates the required buckets and updates the file daily as it is required. I am trying to download those file in google app script and update the Google sheet with data.
From google documentation, there are 2 ways to do so.
- With Oauth
- API KEY.
So far I was able to download file with Oauth but with API KEY I am getting the error
There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.
I have created the API KEy with no restrictions. Also enabled the Cloud Storage JSON api and Cloud storage API.