The API docs say the following:
The overall rate limit is 60 requests per minute. This rate limit applies to any combination of API methods that are called within a trailing 1-minute timeframe
I'm trying the below that gets a response for each page, but I see the following error:
"ok": false, "error": "rate_limited" 429 status code
I feel like the backoff_factor isn't working because I have it set to 1 but I see this error after 18seconds of my code running, shouldn't it run for at least 1 minute?
def get_request():
   session = requests.Session()
   retry = Retry(total=5, connect=7, backoff_factor=1)
   adapter = HTTPAdapter(max_retries=retry)
   session.mount('https://', adapter)
   url = "https://my_url" 
   first_page = session.post(url).json()
   yield first_page
   num_pages = first_page['last_page']
   for page in range(2, num_pages + 1):
       next_page = session.post(url, params={'page': page}).json()
       yield next_page
for page in get_request():
     etc...
   list = []
   for page in range(2, num_pages + 1):
              response = sessions.post(url, params={'page': page}).json()
      r_json = response.json()
      list.append(r_json)
 
    