The RapidAPI Developer Hub

Welcome to the RapidAPI developer hub. You'll find comprehensive guides and documentation to help you start working with RapidAPI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation
Ask A Question


Imgur API failing on post from Chrome extension

Posted by Jason 9 months ago

I've been successfully using the Imgur API for a while now, but recently this error is occurring:

Failed to load The 'Access-Control-Allow-Origin' header contains the invalid value ''. Origin 'chrome-extension://ajdcpfdbildfaahcgabgjhojmbalcnff' is therefore not allowed access.

The code I am using is...

    url: "",
    type: "POST",
    timeout: 45000,
    data: {type: "base64", image: base64Data},
    beforeSend : function(xhr) {
        xhr.setRequestHeader("X-Mashape-Key", "hiddenforprivacy");
        xhr.setRequestHeader("Authorization", "Client-ID " + "hiddenforprivacy");

It seems your technicians or server host has changed the "Access-Control-Allow-Origin" value. The solution would be to set it to *

Loading comments...