I am troubleshooting a jQuery ajax call to the Vimeo API that started failing in the last month or so after having worked for a while.
// Url ends up like "https://www.vimeo.com/api/v2/video/123456789.json?callback=?"
var url = _thumbnailUrl + vimeoId + '.json?callback=?';
$.getJSON(
url,
{ format: "json" },
function (data)
{
// Do Stuff after getting data
}
);
The my guess is that the "?callback=?" was forcing a JSONP return but for some reason that no longer works and returns the following error. I cannot see any information on the Vimeo site about any changes to the API but perhaps they have removed the jsonp support.
text: "parseerror"
error: "jQuery35106413737095079624_1612470990268 was not called"
If I remove the "?callback=?", it works fine in PostMan (as you do not see CORS issues there) but in the browser it errors with:
Access to XMLHttpRequest at 'https://www.vimeo.com/api/v2/video/123456789.json'
from origin 'https://www.myurl.com' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have tried a bunch of things, including re-formating as a straight $.ajax call and switching out various properties on the ajax call, but have not hit on a solution.
Has anyone else see this Vimeo issue? Any suggestions on how to get it to work?