Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yammer JS SDK — problems with CORS

It seems like something has changed on the Yammer side, because my app (not yet published to the Yammer Global App Directory) has stopped working, resulting in an obscure CORS error, that doesn't tell a thing about the problem.

So the workflow is very simple —

  • I'm ensuring that user is logged in by calling getLoginStatus() (which pops-up a window and immediately closes it. Irritating, but can live with that)
  • Sending a request to messages/in_group/ID.json wrapped in a yam.platform.request, as suggested by the Yammer JS SDK manual

Here's the console screenshot:

enter image description here

In the Yammer App settings there's a single Javascript Origin, which is https://buzztale.com, which is exactly the one, the request is made from.

This happened before, but then disappeared itself (really confusing). And now it seems to be back…

Hope somebody has any suggestions regarding this issue. In order to get to the app, here's the URL — https://buzztale.com/yammer.

like image 839
Anthony Dmitriyev Avatar asked Sep 30 '22 06:09

Anthony Dmitriyev


2 Answers

Same here my dev app started failing sometime today. It seems that all of the login end points are working as expected however the messages feed is giving me CORS errors.

yam.platform.request({
            url: "https://api.yammer.com/api/v1/messages/my_feed.json",
            method: "GET",
            success: function (user) { //print message response information to the console
              console.log("The request was successful." + user.messages);
            },
            error: function (user) {
              console.log("There was an error with the request.");
            }
        });
like image 81
Ettienne Avatar answered Oct 18 '22 04:10

Ettienne


Yeah, I'm seeing this on our end too. Seems to be just the GET requests with the messages api endpoint. Like POST / DELETE and Message POST seem to work correctly.

This issue appeared to me around 4PM PST yesterday (7/22/14).

like image 45
jonlejon Avatar answered Oct 18 '22 03:10

jonlejon