how to post video using c#(windows Desktop) Application Get Unauthorization Error

已查看 64 次
跳至第一个未读帖子

Pankaj Kumar

未读,
2015年12月9日 04:47:522015/12/9
收件人 Tumblr API Discussion
Hi everyone.

I am getting Unauthorization Error(constantly) when i make post request ontumblr xAuth access-token URL:
POST https://www.tumblr.com/oauth/access_token
with 
x_auth_username,x_auth_password,x_auth_mode

here is myCode in C#
 HttpWebRequest request = (HttpWebRequest)WebRequest.CreateHttp(Url);

                var headers = new WebHeaderCollection()
                {
                    {"x_auth_username",Uri.EscapeDataString(UserEmail)},
                    {"x_auth_password",Uri.EscapeDataString(Password)},
                    {"x_auth_mode","client_auth"},
                };
                request.Headers = headers;
                request.Method = "POST";
                request.ContentType = "application/x-www-form-urlencoded";
 HttpWebResponse response = (HttpWebResponse)(request.GetResponse());

                var dataStream = response.GetResponseStream();
                StreamReader reader = new StreamReader(dataStream);
                string responseFromServer = reader.ReadToEnd();
                reader.Close();
                dataStream.Close();
                response.Close();

//Generate Unauthorization Error

and I also need to post vidoes
so please if any one done video posting with tumblr api with C#(windows application please share the code)...

very thanks.




Michael Ceyko

未读,
2015年12月14日 10:24:322015/12/14
收件人 Tumblr API Discussion
Hey Pankaj,

xAuth access is disabled by default, and you will receive a 401 response if you don't have the authorization to use it.

Please contact Tumblr Support to be considered for access: https://www.tumblr.com/support

-Mike Ceyko
回复全部
回复作者
转发
0 个新帖子