We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
ptallett
9 years agoHelpful | Level 6
How to use OAuth2 authentication APIs
I am writing a UWP app on Windows 10 with the .NET Dropbox API and want to allow users to login to their Dropbox. Note this is not a web app and I don't have a browser control. var authUri = Drop...
- 9 years ago
I solved it! The redirect URL has to be registered with a trailing slash.
Thanks for your help.
I'm not clear how long my token will last and how I refresh it, could you explain.
Love your API by the way, was a breeze to integrate into my app (except for this auth issue).
Suggestions for improvement:
- things like SearchMode.FilenameAndContent.Instance should be enums that are "or"able
- Would like to search on content only, not name and content
- I'd like a created date for the files and a size for folders
- I'd like wildcards in the search - MyF??e.j*g
- In fact the Google Drive API has a whole query language for search which is quite nice
- Sharing.CreateSharedLinkWithSettingsAsync throwing an exception when the link already exists is dumb. Just return it to me, don't care if its already created
- The Search API and List API should be merged into one API IMHO, but not a big deal
- Thumbnails for PDF and PPT would be nice (like Google)
- Content indexing of PDF and PPT would be nice (there are free IFilters for these)
- Auth should save the token so I don't need to auth every time
Cheers,
Paul
ptallett
9 years agoHelpful | Level 6
I solved it! The redirect URL has to be registered with a trailing slash.
Thanks for your help.
I'm not clear how long my token will last and how I refresh it, could you explain.
Love your API by the way, was a breeze to integrate into my app (except for this auth issue).
Suggestions for improvement:
- things like SearchMode.FilenameAndContent.Instance should be enums that are "or"able
- Would like to search on content only, not name and content
- I'd like a created date for the files and a size for folders
- I'd like wildcards in the search - MyF??e.j*g
- In fact the Google Drive API has a whole query language for search which is quite nice
- Sharing.CreateSharedLinkWithSettingsAsync throwing an exception when the link already exists is dumb. Just return it to me, don't care if its already created
- The Search API and List API should be merged into one API IMHO, but not a big deal
- Thumbnails for PDF and PPT would be nice (like Google)
- Content indexing of PDF and PPT would be nice (there are free IFilters for these)
- Auth should save the token so I don't need to auth every time
Cheers,
Paul
Greg-DB
Dropbox Community Moderator
9 years agoThanks for following up. I'm glad to hear you got this sorted out already. By the way, on the Dropbox side of things, a trailing slash isn't strictly required on a redirect URI, but it is required that the pre-registered redirect URI exactly match the value supplied in the redirect_uri parameter on /authorize. That would include matching the existence or non-existence of a trailing slash.
If they didn't match, you would get an error on /authorize like that. One way to debug that would be to copy the actual /authorize URL and open it in your own browser. The page would show a specific error message.
Anyway, access tokens don't expire by themselves, but they can be revoked by the user or app at any time.
And thanks for the list of feedback! I'll send it along to the team.
If they didn't match, you would get an error on /authorize like that. One way to debug that would be to copy the actual /authorize URL and open it in your own browser. The page would show a specific error message.
Anyway, access tokens don't expire by themselves, but they can be revoked by the user or app at any time.
And thanks for the list of feedback! I'll send it along to the team.
- ptallett9 years agoHelpful | Level 6
Thanks for the quick response, I indeed clicked on the URL and got an error message which was how I figured it out. The trailing slash was being added by the Uri class I think - I was not putting it in but it was getting sent which was confusing and without an error message, hard to isolate.
Cheers,
Paul
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!