PetroGromovo's avatar

Why attaching thumbnail image with dawson/youtube plugin I got permissions error?

On laravel site using dawson/youtube plugin I got error :

        Error calling PUT https://www.googleapis.com/upload/youtube
    /v3/thumbnails/set?videoId=cUubd0Ujwd4&uploadType=resumable&upload_id=ADPycdtm_VVPJSuqibB9mkCE7bYHlvq5DiZ294uzUHqCUGTe
EktrL3y9ApgrQXguJGdCYSkzPBKZ4QH8wiwhi81M0QInAewRNHVL: 
    (403) The authenticated user doesn't have permissions to upload and set custom video 
    thumbnails.root@92bc0dade5fb:/var/www/PostsTagsCRUDTest_DOCKER_ROOT#

In case when thumbPath attached to the request :

    $thumbPath = $uploadFile['thumbPath'] ?? '';
    if ( ! empty($thumbPath)) { // thumbnail image is attached - that raise the error
        $video = Youtube::upload($uploadFile['filenamePath'], [
            'title' => $uploadFile['title'],
            'description' => $uploadFile['description'],
        ], self::$privacyGroup)->withThumbnail($thumbPath);
    } else {  // but if thumbnailis not attached - I have no error and video is uploade ok
        $video = Youtube::upload($uploadFile['filenamePath'], [
            'title' => $uploadFile['title'],
            'description' => $uploadFile['description'],
        ], self::$privacyGroup);
    }

Which permissions have I to add and where ? On youtube side ?

"dawson/youtube": "^2.0.1",
"laravel/framework": "^10.8",

Also I see that this repository has been archived by the owner last month. I suppose I would not use it any more ? Can you advice some other plugin with such functionality ? Thanks in advance!

0 likes
0 replies

Please or to participate in this conversation.