How can i generate token for zoho web api requests in asp.net core 2.2

How can i generate token for zoho web api requests in asp.net core 2.2

I tried to reference below https://www.zoho.com/crm/developer/docs/csharp-sdk/configuration.html article but it shows implementation in app.config while we have appsetting.json. Also it is stated here that we need to manually generate token which would expire in certain time. I would like to generate token when we request the zoho api. Any help is much appreciated