One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
eventshd
5 years agoExplorer | Level 3
Dropbox PHP, How to set a password to shared link using php_sdk
I saw when I get the shared link of the recent uploaded file or folder, it can be protected with password.
But I am not sure how to do it.
$response = $dropbox->postToAPI("/sharing/create_shared_link_with_settings", ["path" => "/BABERZAMAN/hello-world.txt", "settings" => ['requested_visibility' => 'public']]);
$data = $response->getDecodedBody();
var_dump($data);
Here in this
"settings" => ['requested_visibility' => 'public']
From this line 'public' will be changed with some password protection code or property. i am not aware of it. so please help me how i can get the Password Protected shared Link
Yes, the /2/sharing/create_shared_link_with_settings endpoint does offer the ability to set a password when creating a shared link. You can find information on the different parameters offered by this endpoint in the endpoint's documentation. Please refer to that for more information.
For example, you can set the 'requested_visibility' parameter to 'password', and specify the password in the 'link_password' parameter in the 'settings' parameter.
- Greg-DB
Dropbox Staff
Yes, the /2/sharing/create_shared_link_with_settings endpoint does offer the ability to set a password when creating a shared link. You can find information on the different parameters offered by this endpoint in the endpoint's documentation. Please refer to that for more information.
For example, you can set the 'requested_visibility' parameter to 'password', and specify the password in the 'link_password' parameter in the 'settings' parameter.
- eventshdExplorer | Level 3
Thank you So much It worked
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 days ago
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!