# Function to check API status def check_api_status(): try: response = requests.get(profile_url, headers=headers) if response.status_code == 200: print("Kite API is working. User profile fetched successfully.") print("User Profile:", response.json()) else: print(f"Failed to fetch user profile. Status Code: {response.status_code}") except Exception as e: print(f"Error occurred: {e}")