Click here to Skip to main content
15,745,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using daily motion API for uploading videos but when i choose 10 mb or greater then 10 mb file is returns the error.

What I have tried:

the code is
private static UploadedResponse PublishVideo(UploadResponse uploadResponse, string accessToken)
           var request = WebRequest.Create("" + HttpUtility.UrlEncode(uploadResponse.url));
           request.Method = "POST";
           request.ContentType = "application/x-www-form-urlencoded";
           request.Headers.Add("Authorization", "OAuth " + accessToken);

       var requestString = String.Format("title={0}&tags={1}&channel={2}&published={3}",
           HttpUtility.UrlEncode("Some new Title"),

       var requestBytes = Encoding.UTF8.GetBytes(requestString);

       var requestStream = request.GetRequestStream();

       requestStream.Write(requestBytes, 0, requestBytes.Length);

       var response = request.GetResponse();

       var responseStream = response.GetResponseStream();
       string responseString;
       using (var reader = new StreamReader(responseStream))
           responseString = reader.ReadToEnd();

       var uploadedResponse = JsonConvert.DeserializeObject<UploadedResponse>(responseString);
       return uploadedResponse;

and the code where error is occurred is
var response = request.GetResponse(); 

some one could rectify the error .
Updated 17-Apr-16 20:23pm

1 solution

This page Data API Documentation - Dailymotion Developer Area[^]

says, for that error code/text :-

The API call requires authentication but it was not presented or was wholly invalid, or the API call was invalid (invalid_parameter, missing_required_parameter).
Share this answer
arslan afzal bhatti 18-Apr-16 3:50am    
no it is not the error i debug it. All the parameters which are required is passed there and also call is authenticated but in-spite of this the error occurred as i already mentioned that the same code successfully work for smaller files this error occurred only when the file is big

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900