You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

irenee83's avatar
irenee83
Helpful | Level 5
5 years ago

Get access token with C#

I'm making xamarin forms app that must save sqlite database in user dropbox account. I have created the required app to connect my xamarin forms app to dropbox, but i am looking for the C# code to get the access token for login. I have tried these instructions (https://gist.github.com/thomashagstrom/b0856a383bcdcf905c7a774c8c1b0879) with no success. Can you help me with ? Thank.

    • irenee83's avatar
      irenee83
      Helpful | Level 5

      Ok, thank. I will quickly try it. I was trying some code, and I have been able to see the authorization code in the device browser, the code that must be used in the post request to get the access token. My problem in this way is that i don't know how to retrieve this code displayed in the url bar and put it in the post request. If there is a method that can extract this code from the redirectde url in C#, i will try it also. Thank for the replay.

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Yes, when using the OAuth 2 app authorization "code" flow with a redirect URI, the authorization code is returned in a URL parameter with the name "code" on the redirect URI. You would need to retrieve that parameter value, though exactly how you do so will depend on whatever web framework you're using. Or, if you're not using a redirect URI, you can have the user manually copy/paste the code into your app.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!