We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
eni8ma
6 months agoExplorer | Level 4
Simple Web App for getting info about a Dropbox Folder Content or File but Authorisation says NO??
Hey there all! I am quite new to all this. However I have working on a Webflow site that uses xano for the database and wized to run API calls and javascript functionality. I am on a Business ...
- 6 months ago
Hi eni8ma,
Yes, it's possible to pre-generate needed data (primarily refresh token) and latter use it. Keep in mind that you have to avoid credentials exposing (either access or refresh token) while your application works (that would be security issue). Take care with that part of design! Example of refresh token generation by yourself may be seen here. Once you have it, you can initialize one of Dropbox SDKs of your choice and proceed further without further user interaction. Also, you can perform API calls on your own (without official SDK), but you should take care to refresh access token as described (all SDKs do this internally) - the choice is yours. 😉
Hope this clarifies matter.
Здравко
Legendary | Level 20
Refresh token doesn't expire; only access token expire.
For regular API calls only access token may be used! SDK client may be initialized with refresh token - it acquires access token as needed when initialized properly.
eni8ma
6 months agoExplorer | Level 4
Thank you guys I have managed to get this working but I do have another question on this topic.
--header "Authorization: Basic NmZoNnl5ZmNh.......
So from the developer tools I have managed to test some APIs however before i was always using the sl ....... token which I had to specify the user - Dropbox-API-Select-User and path the path root Dropbox-API-Path-Root.
This token from the documentation page Basic NmZoNnl5ZmN.... seem to work fine without refreshing it. So my question whats the difference and which one should I be using.
My use case would be to access the Shared Workspace Folders and Contents not the user specific folders?
Thanks!
- Greg-DB6 months agoDropbox Staff
eni8ma A "Basic" value used in the "Authorization" header corresponds to "App Authentication". A "Bearer" value used in the "Authorization" header corresponds to "User Authentication" (or "Team Authentication").
User (or Team) Authentication are used to access a specific user account (or team).
App Authentication is used by certain endpoints/use cases where a specific account/team is not needed, and so this only involves authenticating the app itself. This only uses the app key/secret, not an access token, and so does not expire and does not need to be refreshed.
You can see which authentication type(s) any given endpoint supports in the documentation.
- Здравко6 months agoLegendary | Level 20
eni8ma, don't mess different authentication types!
If you need to manage public data (like shared link and files etc) then basic authentication is enough. If you need to manage account specific data, you need bearer authentication!
Note: Basic authentication authenticates your application only, while bearer - authenticates the user. So you CANNOT do anything user related (including any file/folder direct access) without bearer authentication.
Hope it's a bit more clear now.
- eni8ma6 months agoExplorer | Level 4
Ok so I think I understand this
Bear Authentication to access user specific folders (which I don't need to)
App Authentication to access team spaces. (which I do want to access)
So in my workspace I have a team space folder which has multiple folders, these folders have been shared and I want to list these directories via the API call.
What I was doing before is using bearer but then accessing the root folder of the shared workspace, which am guessing is not right method and I should be using the App authentication?
Regards- Здравко6 months agoLegendary | Level 20
Hmm... 🤔 Are your team data public??...
Sarcasm... of course...🙂
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 7 days agoIf 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!