dailymotion-sdk-php icon indicating copy to clipboard operation
dailymotion-sdk-php copied to clipboard

post a private video

Open gtraxx opened this issue 2 years ago • 2 comments

Hi, is there a setting to post a video privately and generate a visibility link used in a site. So that the video is only visible on the site and not on Dailymotion.

$videoTitle = $title;
            $channel = 'auto';
            $postvideo = $api->post(
                '/me/videos',
                array(
                    'url'       => $url,
                    'title'     => $videoTitle,
                    //'tags'      => 'dailymotion,api,sdk,test',
                    'channel'   => $channel,
                    'published' => true,
                    'is_created_for_kids' => false,
                )
            );

Best Regards

gtraxx avatar Mar 31 '23 11:03 gtraxx

I found for the parameter during the upload, on the other hand, is the ID different for a private video ?

$postvideo = $api->post(
            '/me/videos',
            array(
                'url'       => $url,
                'title'     => $videoTitle,
                //'tags'      => 'dailymotion,api,sdk,test',
                'channel'   => $channel,
                'published' => false,
                'is_created_for_kids' => false,
                'private'   => true
            )
        );

return => Array ( [id] => xxxxxxx [title] => test client [channel] => auto [owner] => xxxxx ) private ID ???

gtraxx avatar Apr 12 '23 06:04 gtraxx

Hello @gtraxx, yes the ID is different for a private video, you can retrieve it using the private_id fields. To play a private video, use its private ID when you reference it

nicoferron avatar Apr 12 '23 08:04 nicoferron