0

I am trying to get/post data to Yammer using JS SDK provided by Yammer through rest API. To get data I'm using URL as "messages/my_feed.json" which is being converted to "https://api.yammer.com/[network name]/api/v1/messages/my_feed.json" at run time but returning 401.

[Reference http://developer.yammer.com/yammer-sdks/#javascript-sdk]

Request further help to overcome 401 or suggest another endpoint to get/post data.

Thanks & Regards Samik

4
  • Can you post an example code of how you are trying to do this? Aug 25, 2014 at 6:33
  • Below is the sample code used--> yam.platform.request({ url: "messages/my_feed.json", method: "GET", success: function (user) { var htmlval=""; for (i = 0; i < user.messages.length; i++) { htmlval+=user.messages[i].body.plain+"</br>" } document.getElementById('spnRsp').innerHTML=htmlval; }, error: function (user) { alert("There was an error with the request."); } });
    – Samik
    Aug 25, 2014 at 6:52
  • This looks like a bug. The problem is you don't need the network name segment in api urls. Meanwhile you can work around it by using the full path (still no need for the host). "/api/v1/messages/my_feed.json"
    – Marco
    Aug 26, 2014 at 4:03
  • While using (/api/v1/messages/my_feed.json), it appends web app url at run time and becomes (webappurl/api/v1/messages/my_feed.json) and also returns 401.
    – Samik
    Aug 28, 2014 at 5:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.