Oauth2 not working

Hi Team,
I am currently implementing Oauth2 with Gmail in .net and found this aspose article

Aspose Documentation

Access SMTP and IMAP Server using OAuth

Class Libraries & REST APIs for the developers to manipulate & process Files from Word, Excel, PowerPoint, Visio, PDF, CAD & several other categories in Web, Desktop or Mobile apps. Develop & deploy on Windows, Linux, MacOS &…

When I try to get the accesstoken I get 400 bad request
https://accounts.google.com/o/oauth2/token
But if I use
https://www.googleapis.com/oauth2/v4/token
It gives authentication failed

So could you please provide any working example to implement Oauth2 with gmail

@anmolsdna

I suggest you to please visit the following thread for your kind reference. I hope the shared information will be helpful.