728x90

YouTube API에서  썸네일을 업로드할려고 하는데 자꾸 forbidden 에러가 뜹니다.

처음에는 인증이 잘못되어서 그런 것인줄 알았는데 순전히 퍼미션 에러 였습니다.

그래서 퍼미션 권한을 부여해주니 에러없이 업로드 가 되었습니다.

 

"맞춤 동영상 미리보기 이미지 만들기"는 해당 계정에서 이를 확인해줬거나 실시간 스트리밍 액세스 권한이 있는 경우에만 동영상 업로드를 위한 "맞춤 미리보기 이미지"를 업로드 할 수 있습니다.

 

The authenticated user doesnt have permissions to upload and set custom video thumbnails.

"인증 된 사용자에게는 맞춤 동영상 미리보기 이미지를 업로드하고 설정할 수있는 권한이 없습니다"

 

You chose 비디오아이디 to upload a thumbnail.
Video files from /Users/jaehonghan/dev/youtubeUploadFiles:
 0 = 20200402.png
Choose the number of the video file you want to upload: 0
You chose /Users/jaehonghan/dev/youtubeUploadFiles/20200402.png to upload.
Initiation Started
Initiation Completed
GoogleJsonResponseException code: 403 : The authenticated user doesnt have permissions to upload and set custom video thumbnails.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "youtube.thumbnail",
    "location" : "Authorization",
    "locationType" : "header",
    "message" : "The authenticated user doesnt have permissions to upload and set custom video thumbnails.",
    "reason" : "forbidden"
  } ],
  "message" : "The authenticated user doesnt have permissions to upload and set custom video thumbnails."
}
	at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:150)
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:432)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
	at com.tubro.youtube.thumbnails.test.ThumbnailsSetTest.main(ThumbnailsSetTest.java:124)

Process finished with exit code 0

 

아래에 접속하셔서 업로드하고자 하는 계정에 대해서 권한을 부여해 주세요 !!

https://www.youtube.com/verify

 

 

Contiune  버튼을 클릭하시면 해당 계정에 대한 퍼미션 인증에 대한 것들이 뜨게 됩니다.

아래 이미지에서 Custom thumbnails  가 Enabled가 뜨는 것을 확인할 수 있습니다.

 

 

만약에 아래와 같은 화면이 뜨지 않더라도 당황하지 마시고 퍼미션을 얻기 위해 버튼을 클릭해 주세요.

저 같은 경우에도 휴대폰이나 이메일 주소 인증을 통해서 실제 해당 계정에 대한 권한을 갖기 위한 확인 절차를 거쳤습니다.

휴대폰번호를 입력하고 나니 직접 구글에서 연락이 오더라구요. 

영어로 막 얘기를 하는데 ARS이니 그냥 듣고 계시다가 6자리 확인 숫자를 불러주니 그걸 잘 들으시고 입력해 주시면 됩니다.

(한국어가 아닌 영어이니 원,투,쓰리 로 말하니 잘 들으세요 ..ㅋㅋㅋ)

 

 

인증을 거치고 나서 퍼미션 권한을 획득 하시고 나서 다시 실행 해보세요.

Thumbnail이 제대로 올라가는 것을 확인하실 수 있을 것입니다.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/jaehonghan/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/jaehonghan/.m2/repository/org/slf4j/slf4j-log4j12/1.7.30/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

You chose "비디오아이디" to upload a thumbnail.
Video files from /Users/jaehonghan/dev/youtubeUploadFiles:
 0 = 20200402.png
Choose the number of the video file you want to upload: 0
You chose /Users/jaehonghan/dev/youtubeUploadFiles/20200402.png to upload.
Initiation Started
Initiation Completed
Upload Completed!

================== Uploaded Thumbnail ==================

  - Url: https://i.ytimg.com/vi/비디오아이디/default.jpg

Process finished with exit code 0

 

 

+ Recent posts