gpt4 book ai didi

c# - C#中的YouTube API视频上传解析错误

转载 作者:行者123 更新时间:2023-12-03 06:00:50 25 4
gpt4 key购买 nike

我正在尝试通过C#中的API(而非通过客户端)将视频(可恢复)上传到YouTube。

我正在关注these instructions on using resumable upload protocol

但是,当我尝试时,我会返回一个解析错误。

这是我的要求:

POST /upload/youtube/v3/videos?uploadType=resumable&part=snippet,status,contentDetails&key={api_key} HTTP/1.1
Host: www.googleapis.com
X-upload-content-length: 5346742
X-upload-content-type: video/*
Content-type: application/json; charset=UTF-8
Content-length: 277
Authorization: Bearer {access_token}

{
"snippet": {
"title": "My video title",
"description": "This is a description of my video",
"tags": ["cool", "video", "more keywords"],
"categoryId": 22
},
"status": {
"privacyStatus": "public",
"embeddable": True,
"license": "youtube"
}
}

这是响应:
HTTP/1.1 400 Bad Request
Alternate-protocol: 443:quic
Content-length: 171
Via: HTTP/1.1 GWA
X-google-cache-control: remote-fetch
Server: HTTP Upload Server Built on Sep 30 2013 10:58:35 (1380563915)
Date: Wed, 02 Oct 2013 21:38:10 GMT
Content-type: application/json

{
"error": {
"errors": [
{
"domain": "global",
"reason": "parseError",
"message": "Parse Error"
}
],
"code": 400,
"message": "Parse Error"
}
}

谁有想法?

最佳答案

解析错误是由于用大T编写的真

(由于Unity.NET 2.0对我来说,使用Beta库不是一种选择。)

关于c# - C#中的YouTube API视频上传解析错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19147390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com