yadu siva das
yadu siva das

Reputation: 628

How to set the privacy of a video when uploading to vimeo?

I'm using vimeo Api to upload video to vimeo. Video is getting uploaded but the privacy is locked how do i change that to anyone can video and embed ? attached my code below

$video = $vimeo->upload($request->video, [
                    'name' => $request->title,
                    'description' => $request->description,
                    "privacy.view" => "anybody",
                    "privacy.embed" => "public",
                ]);

the above code is not working. what is wrong with my code ?

Upvotes: 0

Views: 374

Answers (1)

Michał
Michał

Reputation: 11

The API docs often use dot notation to represent a hierarchy of data, such as privacy.view. Since the PHP library sends all data using JSON, you must use nested associative arrays instead of dot notation.

// The documentation refers to the following as `privacy.view`
$params = ['privacy' => ['view' => 'disable']]

https://github.com/vimeo/vimeo.php

Upvotes: 1

Related Questions