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
But if I use
It gives authentication failed

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


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