0

I need to get data from Google Analytics GA4 via API. I have created a service account and downloaded the JSON file. See below for an partial copy of the file. I need to use PowerShell and have not had any luck figuring out how to get the tokens for AUTH 2.0 to actually do the API call. I don't know if I need to load a module, but suggestions would be welcome. I don't have a secret code so all of the examples I looked at would not work. If someone can share your knowledge I would gratefully appreciate it.

Sample JSON file {
"type": "service_account", "project_id": "ccc-pull-16 "private_key_id": "313a20f "private_key": "-----BEGIN "client_email": "starting- "client_id": "106846481226 "auth_uri": "https://accou "token_uri": "https://oaut "auth_provider_x509_cert_u "client_x509_cert_url": "h "universe_domain": "google }

Existing Code: I have not tried as I don't have the proper understanding of what I have to do.

Greg Lowe
  • 1
  • 2
  • Have a look at this it should be similar just need to change the scope https://stackoverflow.com/q/76013275/1841839 Just try searching for powershell google service account there are a few examples around. – Linda Lawton - DaImTo Jul 08 '23 at 10:15

0 Answers0