I have a C# .net core desktop app that connects fine to Google Analytics 4 using the Google.Analytics.Data.V1Beta package. I have a .json file that Google created so I can access Google Analytics and I use it in my code as below.
string credentialsJsonPath = projectRootPath + “filename.json”;
your text
BetaAnalyticsDataClient client = new BetaAnalyticsDataClientBuilder
your text
{
CredentialsPath = credentialsJsonPath,
your text
}.Build();`
I have stored the content of the “filename.json” file as a base 64 encoded database field in a table in a database in a SQL Server that my app is connected to and the database field is defined as below.
FileBytes (varbinary(max), not null)your text
How do I replace the CredentialsPath = credentialsJsonPath line above to read the contents of my database field rather having to open a physical .json file like I am doing now?
Cheers
John
I don’t know how to do this.
JohnCKeogh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.