Create OAuth on C#

Are you using the webbrowser component? You can get the current URL from the webbrowser object when you get redirected, and then use that to get the token that you use then to get the access and refresh keys.