Getting a simple Yammer REST call to return

New Contributor

I'm trying to get a simple Yammer REST api running, specifically this one:

 

https://developer.yammer.com/docs/topicsidjson

 

For me, even when using the "try out" tool on the page, it returns a 404 error. I know my token works because it works with some YammerAPIs, it's just a handful that doesn't work, which I need.

 

Currently I'm calling the REST endpoints using ajax/js, and I'm getting a "No Access-Control-Allow-Origin" header error:

 

XMLHttpRequest cannot load https://api.yammer.com/api/v1/messages/about_topic/:769359386.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mydomain.sharepoint.com' is therefore not allowed access. The response had HTTP status code 404.

 

Any ideas?

 

- I have already added my domain to the "Javascript Origins" in my app settings

3 Replies

Anyone? Surely there must be apps out there that are using these APIs

I'm not using that particular one, but I usually use the APIs via PowerShell.  

 

Try removing the colon before your topic ID.  You should simply be supplying the ID number.  So my guess is that you're getting a syntax error.

 

The Try it Now should work, once you enable the OAuth token.  I just tried it on my home network.  

Screen shots for the win here I think....

 

Looking at that error message it does look like its cross origin scripting that's holding you back - so seeing what you've put into the various pages available in the app registration pages could help us help you, plus knowing where you are calling the app from and redirecting it to would be good to see - hide your app id, but double check you are calling the same guid as well.

 

Sorry I cant give you more - but thats what I'd initially check if I got that error.