I got this question via my Drift bot. This article isn't an answer to the question. Rather, it describes a general approach for what you should do if the specific feature you are looking for isn't available in the client library of the programming language you are using.
In other words, this article gives you an answer to the question:
"How to do X using Dialogflow client library for NodeJS / C# / Python / Ruby / Go / Java / PHP"?
Dialogflow Client Libraries
From what I can see, there is a small problem with Dialogflow Client libraries as of this writing.
They don't always work as you might expect 🙂
That is, you are actually far better off accessing the API directly in almost every programming language (maybe except the NodeJS client libraries) than using the client library for that language.
And if you do use the client library, you will end up wading into the code and making some fix to get it to work anyway!
A good example of this is the PHP Client library, which still has a bug in the code which extracts the JSON coming back from the response object.
By the way, yes, I realize that the best thing I could do right now is repro and explain the bug and help the maintainer fix it.  But this is exactly my issue with the entire ecosystem - there seems to be a somewhat implicit expectation that all folks who write code against the Dialogflow client libraries have to spend their own time fixing the bugs/deficiencies in these libraries.
If fixing those bugs is what you really wish to do, stop reading this article and just get the client library. If not, read on.
Direct API access
Now all Google services/products also allow straight up authentication without going through the client library for the specific product (in this example the Dialogflow Client Library for that language). That is, you don't have to use the client libraries to do this.
And yes, it is more laborious to do it by calling the API directly. Yes, you could sometimes be making subtle mistakes which the client libraries will prevent. Yes, you will not have the strongly typed data that you could get if you just used the client library. So obviously there are tradeoffs.
However, once you get your set up working properly, you will get at least 5 benefits
- as mentioned above, the client libraries always seem to be missing that one thing you need. 🙂 You don't have to worry about that if you call the API directly. To be fair to the Dialogflow team though, I think this is probably because Dialogflow itself is evolving quite rapidly
- you will actually understand how Google API Auth works, which will be immensely helpful for future work around the Google APIs
- you will write the whole code, and you will understand it end to end
- as an extra benefit, you will also have to learn the peripheral stuff like Google IAM  to get the direct API access to work. In my opinion, the extra effort is well worth the time for this one reason alone.
- if you are using a less popular language which usually doesn't have client libraries (such as Dart - see the list below), this is the only option so you might as well learn it
So what's the answer to the original question?
1 Get my course. It is programming language agnostic.
2 Use the C# Google library to make the API request. You will have to use the service account JSON, so I think something like the approach described in this article will work. (By the way Daimto is an excellent site if you want to learn about Google authentication in general, and if you are reading this page, you should probably spend some time reading the articles on that site too).
3 The response will be in JSON format. Now you have the data you need to move on to your next step.
Are you just trying to sell your course?
In a way, yes. 🙂
But my bigger point is that the Dialogflow client libraries in many languages are lacking in some way.
You are welcome to do your own analysis on a language-by-language basis and write an article which completely disagrees with mine. If you provide a good analysis, I am happy to link to your article. I think the JSON is valid. I have been able to get the direct JSON response coming from Dialogflow and it seems to parse just fine in the code I have written. But being certain of this will require me to spend a large amount of time reading the existing PHP client library code. Again, same problem.  In fact, I had to force myself to better understand Google IAM before I could create the course. While I have not suddenly become the world expert on the topic of Google IAM, I am quite sure that the extra knowledge helped me get a lot of insight into how Google cloud services work in general. And I believe the course will help you get the same kind of insight.
- Dialogflow Knowledge Connector : Pros and Cons
- How to integrate Telegram with Dialogflow
- Why I avoid using slot filling (required parameters) in Dialogflow
- Free Tool: Convert your WordPress website into a Dialogflow FAQ chatbot
- Dialogflow Mega Agent Tutorial
- Reader Question: Will followup events work when an intent has an input context?
- How to learn Dialogflow in a week
- Reader Question: Do I need a contextual fallback intent for every single context?
- Reader Question: Can I use a single agent for Facebook, WhatsApp and website bot?
- Five ways to integrate a Dialogflow chatbot into your website