c# - How to use OAuth 2 -


i have should have been easy application, need done. however, oauth 2 confusing me. basically, need upload file or group of files box, dropbox, etc. folder backup purposes.

i have gone through sharpbox. seems super easy, cannot compile it. there missing reference or causes throw error:

could not resolve reference. not locate "assemblyapplimit.cloudcomputing.sharpbox.net40". check make sure assembly exists on disk. if reference required code.

also following error:

the type or namespace name 'dropboxcredentials' not found (are missing using directive or assembly reference?)

as far can tell, there aren't updates. how can fix problem?

the first error getting because library "assemblyapplimit.cloudcomputing.sharpbox.net40" can't found. make sure add available folder, reference in project, , include build. second error getting because did not provide dropbox oauth credentials. must authenticate user before making protected requests. found page useful: http://sharpbox.codeplex.com/wikipage?title=sharpbox%20developer%20tutorials&referringtitle=documentation. step number 2 details how authorize oauth dropbox.

oauth 2 less complicated oauth 1 , has few steps.

  1. use url given foreign service generate complete url includes apps unique consumer key, redirect url , other permissions/properties required foreign service.
  2. redirect user url generated in step 1. foreign service complete operations , confirm access app. if goes well, handed unique success token.
  3. make request second location on foreign service takes 3 components - app's consumer key (like username), consumer secret (like password), , unique request token handed app after successful completion of step 2. foreign service takes these 3 parameters , if step 2 success, hands unique token allows app make requests on behalf of user. should store token need make subsequent requests (i store token user's foreign service account id make api calls easier).

i can still provide example of oauth2.0, checked dropbox docs , core api says still version 1 more complicated variety of reasons. in case, recommend sticking third party dedicated library can abstract messy details.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -