cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Dropbox PHP, How to set a password to shared link using php_sdk

Dropbox PHP, How to set a password to shared link using php_sdk

eventshd
Explorer | Level 3
Go to solution

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

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

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.

eventshd
Explorer | Level 3
Go to solution

Thank you So much It worked

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    eventshd Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?