axiosyammer

Yammer autocomplete: No request after successful CORS preflight


Ok, so I've been struggling for a while now...

I'm trying to make a GET request to this URL:

https://api.yammer.com/api/v1/autocomplete/ranked?prefix=oper&models=group:5,user:5,topic:5,

And I see the preflight succeeding:

enter image description here

The problem is that no GET request is made after the preflight. I'm using axios and doing something like:

axios({
    "https://api.yammer.com/api/v1/autocomplete/ranked?prefix=oper&models=group:5,user:5,topic:5",
    "get",
    headers: {
        Accept: "application/json",
        Authorization: `Bearer ${token}`,
        "Content-Type": "application/json"
    }
})

Why do you guys think the actual request is not being sent?


Solution

  • Turned out to be a CORS problem.

    Seems like Yammer changed something on their side and broke that endpoint. Touché

    I had to solve it proxying my requests to that endpoint to my server and return the response from there.