Running a Python script to bulk update queues. The script starts fine but crashes halfway through because the access token expires. Need a way to refresh the token automatically without restarting the whole batch.
requests.get(f"{base_url}/api/v2//queues/{queue_id}", headers=headers)
Getting a 401 Unauthorized error after about 10 minutes of execution.