I use Google Analytics Reporting API V4 along with googleapiclient and oauth2client to pull data from google analytics to my flask app. I did this by creating a key new key in an existing service account. I then created a virtual environment and followed the documentation from here: https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-py. Note I included my client_secrets.json file in my src folder. Before deploying I included the necessary external libraries in the requirements.txt file (google-api-pyhton-client, oauth2client, httplib2, uritemplate), however received a 500 error, unlike what my local environment was producing where it is working fine.
It is also important to know that I have a build pipeline on bitbucket which deploys the web app. I did not make any changes to this yaml file. Any ideas on how to fix this issue?
EDIT: I included the following bash script in my pipeline.yaml file which still results in the same error
- echo src/client_secrets.json
- gcloud auth activate-service-account --key-file src/client_secrets.json
- gcloud config set project