I need to verify purchases of my android App from my AWS lambda in python.
I have seen many posts of how to do so and the documentation and here is the code I have written :
url = f"{google_verify_purchase_endpoint}/{product_id}/tokens/{token}"
response = requests.get(url=url)
data = response.json()
logging.info(f"Response from Google Play API : {data}")
When I do so, it throws a 401 status code not allowed. Alright, I have created a service account to allow the request with OAuth, but how can I use it to allow the request ?
Unfortunately I can't use the google-api-python-client
as mentioned here which is too big for my AWS lambda maximum size of 250Mb unzipped package.
So my question is to use the service account with a simple GET requests or how can I authenticate automatically without the google-api-python-client
?
Thanks in advance
from Authenticate a GET request to Google Play Purchase API with service account python
No comments:
Post a Comment