Which authentication should I use?
AnsweredI have a .NET windows app will be very limited and it will need to query with a filename to get fileid. Then it needs to download the file found. That is all the app will do. There will be no interaction with any user as the app runs in the background. How do I set up authentication.
Hopefully someone can give me a coding example in C#.
-
Official comment
Hello Robert,
You'll want to use JWT authentication based on the use case you've described. Take a look at our .NET SDK, which will make authentication a lot easier than writing the logic yourself. Also, here's how you would search and download.
Good luck!
Kourtney, Box Developer Advocate
Comment actions -
Thank you for the links. I had already figured out how to make this work along these lines. However there are two portions (from what I understand) that are not obvious and really key.
1. For JWT to work, the service account has to have access to the downloadable files. The way I accomplished this was to add the service account as a collaborator. Without a huge amount of searching, I would have never come to this conclusion.
2. Searching for an exact match is not really an exact match. I am not sure who thought exact match could mean just word parts and the entire string. I found a reference to enclose the query string in quotes, again not obvious.
Again thanks for the help, even though I already I found the solution on my own.
Please sign in to leave a comment.
Comments
2 comments