Issues on the Get Zoom Room sensor data

Hi creating a rest api to pull sensordata from a zoom room using neatbar.
I want to pull sensor_type as REAL_TIME_PEOPLE_COUNT, i managed to pull room_id but not the sensor data. What am i doing wrong?

import os
import time
import jwt
import requests
from flask import Flask, jsonify

app = Flask(__name__)

ZOOM_API_KEY = "xxx"

def generate_jwt(api_key, api_secret):
    header = {"alg": "HS256", "typ": "JWT"}
    payload = {"iss": api_key, "exp": int(time.time()) + 3600}
    token = jwt.encode(payload, api_secret, algorithm="HS256", headers=header)
    return token

def get_room_ids():
    headers = {
        'Authorization': f'Bearer {generate_jwt(ZOOM_API_KEY, ZOOM_API_SECRET)}',
        'Content-Type': 'application/json'
    response = requests.get(f'{ZOOM_BASE_URL}/rooms', headers=headers)
    if response.status_code == 200:
        rooms = response.json()["rooms"]
        return [room["id"] for room in rooms]
    return []

def get_sensor_data(room_id):
    headers = {
        'Authorization': f'Bearer {generate_jwt(ZOOM_API_KEY, ZOOM_API_SECRET)}',
        'Content-Type': 'application/json'
    response = requests.get(f'{ZOOM_BASE_URL}/rooms/{room_id}/sensors', headers=headers)
        if response.status_code == 200:
            return response.json()
    except ValueError as e:
        print(f"Error parsing JSON response for room {room_id}: {e}")
    return {}

def format_sensor_data(room_id, sensor_data):
    formatted_data = {"roomId": room_id, "sensors": []}
    sensor_type_map = {
        "CO2": "CO2",
        "TEMPERATURE": "Temperature",
        "REAL_TIME_PEOPLE_COUNT": "Real Time People Count",
        "HUMIDITY": "Humidity",
        "VOC": "VOC"

    if 'sensors' in sensor_data:
        for sensor in sensor_data['sensors']:
            print(f"Sensor description for room {room_id}: {sensor['description']}")  # Debug print
            if sensor['description'] in sensor_type_map:
                formatted_sensor = {
                    "sensor_type": sensor_type_map[sensor['description']],
                    "sensor_value": sensor['value']
    return formatted_data

@app.route("/api/zoom-rooms-sensor-data", methods=["GET"])
def get_zoom_rooms_sensor_data():
    room_id_list = get_room_ids()
    all_sensor_data = []

    for room_id in room_id_list:
        sensor_data = get_sensor_data(room_id)
        formatted_data = format_sensor_data(room_id, sensor_data)

    return jsonify(all_sensor_data)

if __name__ == "__main__":, port=8080)