Get Okta Logs with C# console app

I am creating a console app in C# to monitor our Okta event logs. I am having trouble finding code to query these logs. I have tried:

            var client = new OktaClient(new OktaClientConfiguration
                OktaDomain = Globals.oktaDomain,
                Token= Globals.token

And I have tried

        var client = new OktaClient(Globals.token, Globals.oktaDomain);
        var eventList = client.GetEventsClient();

But neither of these have worked. Is this the wrong code to create a link between my app and Okta, or is it a permissions issue on my Okta account? Both attempts returned empty strings, not errors.

I think you might want to try using the GetLogs method

I’m assuming the GetEventsClient corresponds with the Events API which has been deprecated.

As of Jan 7, 2019 developers of new projects are unable to access the Events API and should use the System Log API.

@warren Ok thanks. I was more looking for a coding example. I am having trouble finding how to use the correct code to access the api. Do you know is there is a coded example out there?