Error 429 for a Single Request

I am trying to use the following url: (00000 replace the actuals)
https://api.particle.io/v1/serial_numbers/000001032HRPKG?access_token=00000f5588a28a0ecfa5412f19419e52686712eb

and I am getting:
{
“error”: “rate_limited”,
“error_description”: “Too many requests in a short period of time. Try again later.”
}
This is a single request
What am I doing wrong?

Hi,
How do you use this API request ? are you using it with node ? js ? or you just make curl call from terminal ?

We will need some more info about your conf. as with simple HTML/JS and fetch() I don’t have any issue to pull this data:

 <html>
  <head>
 <meta name="viewport" content="width=device-width">
 <meta charset="utf-8"/>
</head>

<style>
 html { 
 background: fixed #8c6aec; 
 -webkit-background-size: cover;
 background-size: cover;
} 
 
td:nth-child(even) {
    border-radius: 12px 24px 24px 12px;
    border: 3px solid #E91E63;
    width: auto;
    height: 50px;
    text-align: center;
    background-color: #cddc39;
    color: black;
    font-weight: bold;
}

td:nth-child(odd) {
    border-radius: 24px 12px 12px 24px;
    border: 3px solid #E91E63;
    width: auto;
    height: 50px;
    text-align: center;
    background-color: #03f48b;
    color: black;
    
}		
</style>

<body>

<table id="myTable_D1">
<tr>   
  </tr> 
</table>

<script type="text/javascript">
      var i = 0;
      var ser = "XXXXXXXXXXXXXXXXXXX"; //not display for security
      const accessToken = "XXXXXXXXXXXXXXXXXXX"; //not display for security
      const url_serial = "https://api.particle.io/v1/serial_numbers/" + ser +"?access_token=" + accessToken;
     
     
           
function get_data(){
    fetch(url_serial)
       .then((resp) => resp.json())
       .then(function(data){ 
           console.log("full data", data); 
           draw_table(data);
       })
      .catch(function(error) {
       console.log(error);            
    }); 
}

function draw_table(data){
  var table_D1 = document.getElementById("myTable_D1");
  var cel_0_D1 = [];
  var cell_D1 = [];
  var row_0_D1 = [];

  if(i>0){
     for(i; i>=0; i--){
        table_D1.deleteRow(i);
       }
   }

  for(var j = 0; j<=3; j++){
     row_0_D1[j] = table_D1.insertRow(j);
   }

  Object.keys(data).forEach(function(key, i) {
      cel_0_D1[i] = row_0_D1[i].insertCell(0);   
      cel_0_D1[i].innerHTML = data[key];
      cell_D1[i] = row_0_D1[i].insertCell(0); 
      cell_D1[i].innerHTML  = key + " => ";
   });
  i = 3;
}

setInterval(get_data, 1000);

</script>
</body>
</html>

Curl and Postman

No clue why simple curl can give you this error :man_shrugging:t3: Regarding Postman, are you on free trial ? Maybe you hit API cals limit ?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.