Forum Discussion

Mike2020's avatar
Mike2020
New member | Level 2
5 years ago

Write-only access token

I'm trying to create a web interface for users to upload files directly to a folder in my dropbox, rather than their own. I was planning on hard-coding a token that only has write permission into the web app and using the upload endpoints on the API, but the available scopes aren't what I expected. I don't seem to be able to create a separate user with write-only permission to a folder either. File requests aren't ideal for my use case unless I'm missing a way to respond to them using the API, but that's the type of access I'm looking for.

 

Is there a way to do this?

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    [ Cross-linking for reference: https://stackoverflow.com/questions/61468956/dropbox-write-only-access-token ]

     

    No, unfortunately the Dropbox API doesn't offer a write-only permission or a way to programmatically upload to file requests, but I'll pass these along as feature requests. I can't promise if or when they might be implemented though. 

     

    One thing you might want to use though is the /2/files/get_temporary_upload_link endpoint. If you can run code on your server, you could make that call there where you can protect your access token, and then pass down the resulting link to the user's browser to have it perform the upload using that there, without the access token.

  • Simons CMAP's avatar
    Simons CMAP
    Explorer | Level 3
    5 years ago

    Thanks for the reply and suggestion! I considered this solution but need to allow uploads larger than 150MB.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Understood, thanks. I'll pass this along as a feature request for a version of that that would support larger files, but I can't promise if or when that might be implemented of course. 

About Dropbox API Support & Feedback

Node avatar for 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!