我正在用Java构建视频服务应用程序(使用google youtube v3 API),该应用程序需要将视频上传到Youtube并管理上传。 几个月前,该服务运行良好,但是当我现在尝试对其进行测试时,出现错误。
我同样尝试使用Google提供的示例测试应用上传 https://github.com/youtube/api-samples/tree/master/java,我仍然遇到错误。 照原样使用代码,但我只是更改客户端ID和密码。
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "youtube.quota",
"message" : "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>.",
"reason" : "quotaExceeded"
} ],
"message" : "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>."
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
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$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
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.google.api.services.samples.youtube.cmdline.data.MyUploads.main(MyUploads.java:107)
There was a service error: 403 : The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.
我同样尝试使用其他Google帐户,但仍然遇到相同的错误。
我搜索并尝试了其他选项,但均未成功。