We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Stefano B.3
10 years agoNew member | Level 1
Access token js , security ?
HI sorry for english :
i use this script to upload file directly on my dropbox app with javascript:
<form onSubmit="return uploadFile()">
<input type="hidden" id="access-token" value="<?=$token ?>" />
<label>Seleziona il file da caricare</label>
<br>
<input type="file" id="file-upload" />
<br>
<button type="submit">Esegui l'upload</button>
</form>
in this way the access token is show in souce code .
if a developer use this access token can create an app and manage the file of my folder ,
it's true ?
if it's true how can i secure it ?
1 Reply
- Stephen C.1410 years ago
Dropbox Staff
If you're trying to build an app for clients to upload files to one Dropbox account (say your personal account), then there is no client-side solution that will allow clients to securely upload directly to your Dropbox. Your access token will always be exposed client-side.
If you want to use your personal Dropbox account as a place for users to upload content, then you will need to implement a server-side solution. For example, you can have clients upload content to your server and then from your server, you can upload the content directly to your personal Dropbox account. In this case, you would not want to use the JavaScript SDK, instead perhaps the Java SDK (https://www.dropbox.com/developers/documentation/java).
Does this answer your question?
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!