RESTful API get request not working in most cases

I’ve been trying to use RESTful API to send a get request to my blynk server and fetch a certain pin value. However, the get request only works when it’s being sent from either a local file, or from itself. When I try to send it from the console of any other website, I always get this error:

"Mixed Content: The page at ‘https://’ was loaded over HTTPS, but requested an insecure resource ‘’. This request has been blocked; the content must be served over HTTPS."

I tried changing the link to “” but then I get this error:

I’ve tried sending the get requests to both and, and the error persists in both cases.

I’ve been using the code right off the Blynk API docs:

var request = new XMLHttpRequest();'GET', '');

request.onreadystatechange = function () {
  if (this.readyState === 4) {
    console.log('Status:', this.status);
    console.log('Headers:', this.getAllResponseHeaders());
    console.log('Body:', this.responseText);


I realise that this is probably some sort of a security issue, but I don’t know how to fix it. Please help.

Are you actually using the word “pin” in this request, or are you using something like “D5” or “V20” ?


I’ve been using V1 and V50.