I have a DOTNET Core Web API, I need to have 1 API which will generate the access token this access token will be used for the further processes like Uploading files, etc.
How can I get the access token Programatically in C# in Dropbox.
Manually I'm getting by login into the Portal but need to do it programmatically
Manually I'm getting by login into the Portal but need to do it programmatically.
It is not possible to fully automate the process where the user chooses to authorize the app and the app then receives the resulting access token and optional refresh token. This needs to be done manually by the user at least once.
If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.
You can find more information in the OAuth Guide and authorization documentation.
For .NET in particular, we recommend using the official Dropbox .NET SDK, which will do most of the work for you. You can find examples of using that here.