2017-08-02 129 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