2017-08-02 106 views
1

有没有办法以编程方式拒绝挂起的请求,以及我没有看到任何API,因此任何yammer专家我们在那里帮助?Yammer以编程方式拒绝请求

从Chrome开发人员工具中,我看到这是由Yammer UI发送的请求。

https://www.yammer.com/****/join_requests/968249/deny 

代码中我们使用了:

WebRequest request = WebRequest.Create("https://www.yammer.com/****/join_requests/968249/deny"); 
       request.Method = "POST"; 
       string postData = "userId=" + userId;    
       byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(postData); 

       // Set the ContentType property of the WebRequest. 
       request.ContentType = "application/x-www-form-urlencoded"; 

       // Set the ContentLength property of the WebRequest. 
       request.ContentLength = byteArray.Length; 

       request.Headers.Add(HttpRequestHeader.Authorization, yammerToken); 

       // Get the request stream. 
       Stream dataStream = request.GetRequestStream(); 
       // Write the data to the request stream. 
       dataStream.Write(byteArray, 0, byteArray.Length); 
       // Close the Stream object. 
       dataStream.Close(); 

       // Get the response. 
       WebResponse response = request.GetResponse(); 

错误:未找到404,其OBV的API是不存在的,因此任何解决方案

请找出图像 enter image description here

+0

我想你可能需要在你的问题上更具体一些。你是否有一些与Yammer集成的现有自动化,或者你是从头开始的?什么是实际要求?是否有大量待处理的请求,并且您想要一次性拒绝它们,还是您需要立即拒绝请求的内容?这似乎很奇怪,你会有一个Yammer小组,你不想让任何人加入! – DaveyDaveDave

+0

嗨戴夫,我想我的问题是自我解释,我在问一些关于编程的问题,有很多api在Yammer中,像https://www.yammer.com/api/v1/messages.json这样做的工作获取消息但是我的方案就像我想拒绝用户发出的邀请请求,并且没有API,所以我想以某种方式实现功能FYI:我用C#编程 – PaTHP

回答

0

有不是这样做的受支持的API。

+0

嗨Brian Lyttle,我知道没有API,我在问这是什么工作,我需要一些方法来实现这个.. – PaTHP