Method: validator.validate

  • This webpage documents how to use the YouTube Partner API's validator to validate a metadata file through a POST request to https://youtubepartner.googleapis.com/youtube/partner/v1/validator .

  • The request requires the onBehalfOfContentOwner query parameter to specify the content owner, particularly for users managing multiple content owners.

  • The request body must be a ValidateRequest object, including the uploader name, the metadata file contents, the locale for error messages, and the resource kind .

  • The response body will include a status string indicating the validation results, an array of errors and/or warnings objects, and a kind string confirming the response type.

  • To use this endpoint, the request must be authorized with the https://www.googleapis.com/auth/youtubepartner OAuth scope.

validator.validate a metadata file.

HTTP request

POST https://youtubepartner.googleapis.com/youtube/partner/v1/validator

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
onBehalfOfContentOwner

string

The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of. This parameter supports users whose accounts are associated with multiple content owners.

Request body

The request body contains an instance of ValidateRequest .

Response body

Response from validation request.

If successful, the response body contains data with the following structure:

JSON representation
 { 
 "status" 
 : 
 string 
 , 
 "errors" 
 : 
 [ 
 { 
 object (  ValidateError 
 
) 
 } 
 ] 
 , 
 "kind" 
 : 
 string 
 } 
Fields
status

string

The validation status.

errors[]

object ( ValidateError )

The list of errors and/or warnings.

kind

string

The type of the API resource. For this operation, the value is youtubePartner#validateResponse .

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/youtubepartner

For more information, see the OAuth 2.0 Overview .

ValidateRequest

Request to validate content.

JSON representation
 { 
 "uploaderName" 
 : 
 string 
 , 
 "content" 
 : 
 string 
 , 
 "locale" 
 : 
 string 
 , 
 "kind" 
 : 
 string 
 } 
Fields
uploaderName

string

The uploader name.

content

string

The metadata file contents.

locale

string

The desired locale of the error messages as defined in BCP 47 (http: //tools.ietf.org/html/bcp47). For example, "en-US" or "de". If not // specified we will return the error messages in English ("en").

kind

string

The type of the API resource. For this operation, the value is youtubePartner#validateRequest .

Design a Mobile Site
View Site in Mobile | Classic
Share by: