I tried controlling the LED and Buzzer with the Digital Port but couldn’t after checking the Chrome console log I found out the error #429
boltCommands.js:28 GET https://cloud.boltiot.com/remote/a76d64d6-fc09-4c63-91b7-4331fe9cc018/digitalWrite?pin=1&state=HIGH&deviceName=BOLT3848684 429 (TOO MANY REQUESTS)
I also got a mail from BOLT that too many requests were generated by my API.
As I’m new to this and don’t know what it means and I haven’t coded the device for multiple request generation.
Help needed!
<!DOCTYPE html>
<html>
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body>
<center>
<button onclick="digitalWrite(1,'HIGH');">ON</button> // I have used Digital Port 1//
<button onclick="digitalWrite(1,'LOW');">OFF</button>
</center>
</body>
</html>
In boltiot cloud account go to api’s section if you haven’t generated any api then click on generate new api then you can see the api there click on the eye icon to see your api if you have already generated an api key then use that api .you have to copy the api key and use it in your code in the function set key in api field and in the name field you have to write your device Id which starts with the BOLT and some numbers this can be found in your boltiot cloud account on the devices section .
@narang.rahul.rahul8
The code 429(TOO MANY REQUESTS) suggests that you have been rate limited.
Please check you email regarding the same.
Also, Don’t share your API_KEY in the open forums. Please generate a new API_KEY and start using that in your code so that it is not used by anyone.
2 Likes
Code seems to be without any error.try generating a new API key in the bolt cloud platfrom and don’t share with anyone.Also try to make your code more readable,try identation so that you could have clarity about your code.
1 Like