سرویس شناسه محتوای YouTube
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
سرویس شناسه محتوای یوتیوب به شما امکان میدهد از API شناسه محتوای یوتیوب در Apps Script استفاده کنید. این API به توسعهدهندگان اجازه میدهد مستقیماً با سیستم مدیریت حقوق شناسه محتوای یوتیوب تعامل داشته باشند. به عنوان یک شریک یوتیوب، میتوانید از API برای ایجاد و مدیریت داراییها، ادعاها و کمپینهای خود استفاده کنید.
مرجع
برای اطلاعات دقیق در مورد این سرویس، به مستندات مرجع برای API عمومی شناسه محتوای یوتیوب مراجعه کنید. مانند تمام سرویسهای پیشرفته در Apps Script، سرویس پیشرفته شناسه محتوای یوتیوب از همان اشیاء، روشها و پارامترهای API عمومی استفاده میکند. برای اطلاعات بیشتر، به بخش «نحوه تعیین امضاهای روش» مراجعه کنید.
/** * This function creates a partner-uploaded claim on a video with the specified * asset and policy rules. * @see https://developers.google.com/youtube/partner/docs/v1/claims/insert */functionclaimYourVideoWithMonetizePolicy(){// The ID of the content owner that you are acting on behalf of.constonBehalfOfContentOwner="replaceWithYourContentOwnerID";// A YouTube video ID to claim. In this example, the video must be uploaded// to one of your onBehalfOfContentOwner's linked channels.constvideoId="replaceWithYourVideoID";constassetId="replaceWithYourAssetID";constclaimToInsert={videoId:videoId,assetId:assetId,contentType:"audiovisual",// Set the claim policy to monetize. You can also specify a policy ID here// instead of policy rules.// For details, please refer to the YouTube Content ID API Policies// documentation:// https://developers.google.com/youtube/partner/docs/v1/policiespolicy:{rules:[{action:"monetize"}]},};try{constclaimInserted=YouTubeContentId.Claims.insert(claimToInsert,{onBehalfOfContentOwner:onBehalfOfContentOwner,});console.log("Claim created on video %s: %s",videoId,claimInserted);}catch(e){console.log("Failed to create claim on video %s, error: %s",videoId,e.message,);}}
بهروزرسانی مالکیت داراییها
این تابع مالکیت شما را بر روی یک دارایی موجود بهروزرسانی میکند.
/** * This function updates your onBehalfOfContentOwner's ownership on an existing * asset. * @see https://developers.google.com/youtube/partner/docs/v1/ownership/update */functionupdateAssetOwnership(){// The ID of the content owner that you are acting on behalf of.constonBehalfOfContentOwner="replaceWithYourContentOwnerID";// Replace values with your asset idconstassetId="replaceWithYourAssetID";// The new ownership here would replace your existing ownership on the asset.constmyAssetOwnership={general:[{ratio:100,owner:onBehalfOfContentOwner,type:"include",territories:["US","CA"],},],};try{constupdatedOwnership=YouTubeContentId.Ownership.update(myAssetOwnership,assetId,{onBehalfOfContentOwner:onBehalfOfContentOwner},);console.log("Ownership updated on asset %s: %s",assetId,updatedOwnership);}catch(e){console.log("Ownership update failed on asset %s, error: %s",assetId,e.message,);}}
انتشار یک ادعا
این تابع، یک ادعای موجود در مورد یک ویدیو را منتشر میکند.
/** * This function releases an existing claim your onBehalfOfContentOwner has * on a video. * @see https://developers.google.com/youtube/partner/docs/v1/claims/patch */functionreleaseClaim(){// The ID of the content owner that you are acting on behalf of.constonBehalfOfContentOwner="replaceWithYourContentOwnerID";// The ID of the claim to be released.constclaimId="replaceWithYourClaimID";// To release the claim, change the resource's status to inactive.constclaimToBeReleased={status:"inactive",};try{constclaimReleased=YouTubeContentId.Claims.patch(claimToBeReleased,claimId,{onBehalfOfContentOwner:onBehalfOfContentOwner},);console.log("Claim %s was released: %s",claimId,claimReleased);}catch(e){console.log("Failed to release claim %s, error: %s",claimId,e.message);}}
تاریخ آخرین بهروزرسانی 2025-12-16 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-12-16 بهوقت ساعت هماهنگ جهانی."],[],[]]