I am attempting to implement back-end support my mobile app which needs to securely utilize the Google Cloud APIs relating to Google Play Billing. I have successfully created the required Google service account, and am getting push notifications from Google Cloud to my back-end, which I can decode and use.
In a nutshell, when I get a push notification from Google that a mobile app user of mine has purchased a subscription using the app, I need to be able to call back into the Google Cloud API to gather more information about that purchase, in order to update their account status in my back-end collections.
To do this requires that I set up various pieces on the Google Cloud side and then generate a private key associated with my Google service account (all of which I have done).
My problem is all the examples I have been able to find showing server-to-server access to Google Clound show using an environmental variable GOOGLE_APPLICATION_CREDENTIALS which is supposed to then hold the path to that .json service account key file. I don’t see any way to support this using Velo.
I did find this post , which looked promising except that the APIs I am trying to use (example here ) don’t seem to have the equivalent option of passing the private service account key to authenticate as the service account to then make that API call.
Is there an example of how to do this somewhere that someone could point me to?
I did install the googleapis node module, and have been perusing the documentation , but I’m a bit uncertain how to implement this in a Velo context.
Thanks!