cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API to set_password for shared folder?

API to set_password for shared folder?

m1lle
Explorer | Level 4

Using create_shared_link_with_settings I am able to share a folder and set a password for it. But I don't seam to find any way to *change* this password?

 

How do I do that through the API? Is it possible?

 

I found update_folder_policy for this, but it's not usable for an "App Folder" app. (I'm getting the error: Your API app is an "App Folder" app. It is not allowed to access this API function)

1 Accepted Solution

Accepted Solutions

Re: API to set_password for shared folder?

Greg-DB
Dropboxer

To set a password, you need to set the 'requested_visibility' to 'password'. So, in your example, that would look like:

 

 

--data '{"url":"https://www.dropbox.com/sh/rjg3ms4tkca69XX/AABQP1tMaxHjUey4b8mQlg9XX?dl=0","settings":{"link_password":"zzz","requested_visibility":{".tag":"password"}}}'

 

 

View solution in original post

9 Replies 9

Re: API to set_password for shared folder?

Greg-DB
Dropboxer

To change the password for an existing shared link for a folder, e.g., created via create_shared_link_with_settings, you should use modify_shared_link_settings.

Re: API to set_password for shared folder?

m1lle
Explorer | Level 4

Sounded really promising! Thank you for pointing me in the right direction.

 

Unfortunley I'm getting an error using that command:

 

{"error_summary": "settings_error/invalid_settings/..", "error": {".tag": "settings_error", "settings_error": {".tag": "invalid_settings"}}}

 

Using the CURL command with this data:

--data '{"url":"https://www.dropbox.com/sh/rjg3ms4tkca69XX/AABQP1tMaxHjUey4b8mQlg9XX?dl=0","settings":{"link_password":"zzz"}}'

 

All settings for this command are optional according to the documentation, but I'm still getting invalid_settings?

(Perhaps it has to to something with the URL parameter?) 

 

Suggestions on what could be wrong?

 

Re: API to set_password for shared folder?

Greg-DB
Dropboxer

To set a password, you need to set the 'requested_visibility' to 'password'. So, in your example, that would look like:

 

 

--data '{"url":"https://www.dropbox.com/sh/rjg3ms4tkca69XX/AABQP1tMaxHjUey4b8mQlg9XX?dl=0","settings":{"link_password":"zzz","requested_visibility":{".tag":"password"}}}'

 

 

View solution in original post

Re: API to set_password for shared folder?

m1lle
Explorer | Level 4
Ahhh, "optional", but not so optional. Thanks a thousand, Greg!

Re: API to set_password for shared folder?

tyni02
New member | Level 2

porfavor mandenme el correo para repuperar la cuenta porfavor se lo suplico

Re: API to set_password for shared folder?

Greg-DB
Dropboxer

@tyni02 You can contact support here:

 

https://www.dropbox.com/support

 

---

Puede contactar al soporte aquí:

 

https://www.dropbox.com/support

Re: API to set_password for shared folder?

xsmael
New member | Level 2

What if i dont want to set a password ?

Re: API to set_password for shared folder?

xsmael
New member | Level 2

@Greg-DB  a écrit :

To set a password, you need to set the 'requested_visibility' to 'password'. So, in your example, that would look like:

 

 

--data '{"url":"https://www.dropbox.com/sh/rjg3ms4tkca69XX/AABQP1tMaxHjUey4b8mQlg9XX?dl=0","settings":{"link_password":"zzz","requested_visibility":{".tag":"password"}}}'

 


What if i dont want to set a password ?

Re: API to set_password for shared folder?

Greg-DB
Dropboxer

@xsmael If you want to create a shared link without a password, you would still use /2/sharing/create_shared_link_with_settings , but you would omit the 'link_password' parameter (and use 'requested_visibility' accordingly, i.e., either omit it it set it to something other than "password"). 

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    xsmael New member | Level 2
  • User avatar
    tyni02 New member | Level 2
What do Dropbox user levels mean?
Need more support?