Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.
Forum Discussion
eni8ma
2 years 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 ...
- 2 years 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.
Здравко
2 years agoLegendary | Level 20
eni8ma, You don't need to implement that part if it isn't needed on client side. So skip that part and use curl instead.
It's not a good idea usage of any AI, by the way!!! Does your own intelligence miss? 🙂😁😉
eni8ma
2 years agoExplorer | Level 4
Yes I actually gave up on it and used an online curl command runner. I have received the refresh token alongside a 4 hour access token and then I tried to refresh the access token using again the online curl editor and it worked but please just to confirm now that I have the refresh token this can be used to refresh tokens and does not expire right? Therefore I would not need to authorise my app again.
I know I should not rely on AI but it has helped with some issue but in some cases it can point you in the wrong direction for sure 😂
I hope I can learn more as I do need to have the refresh function running on my platform to give me new access tokens. Am gonna try now to see if I can get the function to work in the Javascript in wized!
- Здравко2 years agoLegendary | 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.
- eni8ma2 years 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-DB2 years ago
Dropbox Community Moderator
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.
About Discuss Dropbox Developer & API
Make connections with other developers815 PostsLatest Activity: 4 years ago
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 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!