Regarding the error " you have been rate limited "

I was playing with the project of LED intensity control on ubuntu.
I wrote a code for step be step increase in brightness of LED using three for loops running for values in range 1 to 100 .
As I run the program i get a error "you have been rate limited , try after 5 hours 44 mins "
please help me on this topic

Hi @akshay.sonawane449,

Please check this link https://docs.boltiot.com/docs/api-access-rules

This has happened because there is a rate limit of your API access

You’ve crossed your rate limit, nothing to worry about though after the giving number of hours you can try again

hi @akif.iqbal I tried many times even after waiting for mentioned duration I am not able to run the code. what should i do ? kindly suggest

Hi @trupti1196,

Do create a new post, mention your query with screenshot of the error and code.

@harshithareddy711

There is a solution to that. You can upgrade to Bolt Cloud Pro to avoid the API rate limit.

1 Like

Even I had the same problem. I got an email regarding this saying “Your API access has been rate limited” and my API access was blocked. Then I clicked the link which was given in the mail to unblock my API access and then the problem was resolved. I am sure even your problem will be resolved.

It seems like you’ve encountered a rate-limiting issue. Rate limiting is a mechanism implemented by certain services or APIs to control the number of requests a user can make within a specified time frame. When you exceed the allowed limit, you may receive an error message like the one you described.

Here are some general suggestions to address this issue:

  1. Check the API or Service Documentation: Review the documentation of the API or service you are using for LED control. Look for information on rate limits and any guidelines for usage. It’s possible that you are exceeding the allowed rate, and the service is enforcing a temporary restriction.
  2. Adjust Your Code: If you are interacting with an external service or API, make sure that your code doesn’t make too many requests in a short period. You might need to introduce delays between requests or optimize your code to be more efficient.
  3. Use Exponential Backoff: Implement exponential backoff in your code. This means that if you receive a rate-limiting error, you wait for an increasing amount of time before retrying. This can prevent continuous hitting of the rate limit.
    Example (pseudo-code):
    import time

def make_request():
# your code to make the request

def main():
max_retries = 3
retries = 0

while retries < max_retries:
    try:
        make_request()
        break  # Break out of the loop if the request is successful
    except RateLimitError as e:
        # Handle rate-limiting error
        print(f"Rate-limiting error: {e}")
        retries += 1
        # Exponential backoff: wait 2^retries seconds before retrying
        time.sleep(2 ** retries)
else:
    print("Max retries reached. Exiting.")

main()

  1. Contact the Service Provider: If you are working with a third-party service, check their support channels or documentation to see if there are any specific procedures for addressing rate-limiting issues. Some services provide higher rate limits for registered users or have other mechanisms in place.

Remember that the specific solution may depend on the details of the LED control service or API you are using. If you provide more information about the service or API, I can offer more targeted advice.

Unfortunately, you’ve reached your request limit for API access. This means you’ve used the service more than 20 times within the past hour. Don’t worry, you can try again after six hour.
It is basically been used for the security purpose.
If you want to use the device for more number of times you can just upgrade to the pro version provided by the bolt.

Rate limited issue in Bolt Iot arises when you send to many API requests under a short period of time. Your 1 to 100 loop in python took miliseconds to execute and this sent 100 request under 1 second to the Bolt cloud.

Either you can use “time.sleep(10)” inside the loop after your code or you upgrade to Pro.