Okta .net web api core independent login

I have one okta .net application created on okta itself. I want to implement login flow on server side i.e. at asp.net core web api ( not on client side) by sending username and password to web api. How can I implement it independently?