Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to make shared link password protected #176

Open
baberzaman opened this issue Oct 8, 2020 · 1 comment
Open

how to make shared link password protected #176

baberzaman opened this issue Oct 8, 2020 · 1 comment

Comments

@baberzaman
Copy link

baberzaman commented Oct 8, 2020

Here is the simple Shared Link with Public visibility. I want to make password protected shared link. Can anyone help how i can do that

(/**
* Assuming you have configured the DropboxApp class
* @see https://github.com/kunalvarma05/dropbox-php-sdk/wiki/Configuration
*/
$dropbox = new Dropbox($app);
$response = $dropbox->postToAPI("/sharing/create_shared_link_with_settings", ["path" => "/hello-world.txt", "settings" => ['requested_visibility' => 'public']]);

$data = $response->getDecodedBody();
var_dump($data))
@gulgulia17
Copy link

gulgulia17 commented May 11, 2021

You can only use this feature on the premium membership of dropbox.

I've tested it on Laravel and it may be helpful to you.

$settings = [
    "path" => '/filepath',
    "settings" => [
        "expires" => 'yourdesiretime', //format => 'Y-m-d\TH:m:s\Z
        "access"  =>  [
            ".tag" => 'viewer'
        ],
        "link_password" => 'yourpassword',
        "requested_visibility" => [
            ".tag" => "password"
        ],
        "audience" => [
            ".tag" => "password"
        ]
    ]
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants