Note that there are some explanatory texts on larger screens.

plurals
  1. POYouTube API v3 - upload video
    primarykey
    data
    text
    <p>I would like load myVideo.avi on YouTube with my Qt5 programm. I successful authorisation through OAuth 2.0 and get access_token without errors.</p> <p>But when I try to use API <a href="https://developers.google.com/youtube/v3/docs/videos/insert" rel="nofollow">https://developers.google.com/youtube/v3/docs/videos/insert</a> I get some erros!</p> <pre><code>QString googleApiUrl = "https://www.googleapis.com/upload/youtube/v3/videos?access_token="+authorisation-&gt;getAccessToken()+"&amp;part=snippet"; QNetworkRequest request; request.setUrl(QUrl(googleApiUrl)); QHttpMultiPart *multiPart = new QHttpMultiPart(QHttpMultiPart::MixedType); QHttpPart videoPart; videoPart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("video/*")); videoPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("Slug")); m_video = new QFile(m_filePath); if (m_video-&gt;open(QIODevice::ReadOnly)) { videoPart.setBodyDevice(m_video); } multiPart-&gt;append(videoPart); m_networkManager = new QNetworkAccessManager(); m_networkManager-&gt;post(request,multiPart); connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleNetworkReply(QNetworkReply*))); </code></pre> <p>response-</p> <pre><code>"Host requires authentication" "{ "error": { "errors": [ { "domain": "youtube.header", "reason": "youtubeSignupRequired", "message": "Unauthorized", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Unauthorized" } } " </code></pre> <p>What I do wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload