---title: Updating the Look of Video Conferencesdescription: Change the look of all of your Video Conferences with ease!slug: /guides/update-look-video-conferencesidebar_position: 15x-custom: ported_from_readme: true needs_review: true---Overview--------Were going to be changing the look of our Video Conferences using Video API endpoints. The Update a Video Conference endpoint allows us to update the look of any Video Conference by passing it [Hex color codes](https://htmlcolorcodes.com/color-picker/). Full code example: Updating the Look of Video Confereces
pythonimport requestsfrom requests.auth import HTTPBasicAuth# TODO: Update these variables with your ownspaceURL = YOURSPACE.signalwire.comprojectID = XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXauthToken = PTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAUTH = HTTPBasicAuth( projectID, authToken)class LayoutColors: def __init__(self, primary, background, foreground, success, negative): self.primary = primary self.background = background self.foreground = foreground self.success = success self.negative = negative# TODO: Pick the colors to useLIGHT_COLORS = LayoutColors( #FFFFFF, # Primary - Used for CTA buttons and selected items. #FFFFFF, # Background - Main background color. #FFFFFF, # Foreground - Main foreground color. #FFFFFF, # Success - Used for success indications. #FFFFFF # Negative - Used for error indications. ) DARK_COLORS = LayoutColors( #FFFFFF, # Primary - Used for CTA buttons and selected items. #FFFFFF, # Background - Main background color. #FFFFFF, # Foreground - Main foreground color. #FFFFFF, # Success - Used for success indications. #FFFFFF # Negative - Used for error indications. )# Function to make the request to the url endpointdef getData(url): payload = {} headers = {} response = requests.request( GET, url, headers = headers, data = payload, auth = HTTPBasicAuth( projectID, authToken)).json() allData = response[data] while next in response[links].keys(): response = requests.get( response[links][next], auth=HTTPBasicAuth(projectID, authToken)).json() allData.extend(response[data]) return allDataVIDEO_CONFERENCES_URL = fhttps://{spaceURL}/api/video/conferences# Get all Video ConferencesvideoConferences = getData(VIDEO_CONFERENCES_URL)# Loop through video conferencesfor conference in videoConferences: payload = { light_primary: LIGHT_COLORS.primary, light_background: LIGHT_COLORS.background, light_foreground: LIGHT_COLORS.foreground, light_success: LIGHT_COLORS.success, light_negative: LIGHT_COLORS.negative, dark_primary: DARK_COLORS.primary, dark_background: DARK_COLORS.background, dark_foreground: DARK_COLORS.foreground, dark_success: DARK_COLORS.success, dark_negative: DARK_COLORS.negative } try: response = requests.put( fhttps://{spaceURL}/api/video/conferences/{conference[id]}, json = payload, auth = AUTH) print(f{conference[display_name]} room colors updated successfully.) except requests.exceptions.HTTPError as errh: print(An Http Error occurred: + repr(errh)) except requests.exceptions.ConnectionError as errc: print(An Error Connecting to the API occurred: + repr(errc)) except requests.exceptions.Timeout as errt: print(A Timeout Error occurred: + repr(errt)) except requests.exceptions.RequestException as err: print(An Unknown Error occurred + repr(err)) What do I need to run this code?--------------------------------You will need your [SignalWire API credentials](/guides/navigating-your-space#api), which you can find in the API tab of your SignalWire Space, as well as the [requests](https://pypi.org/project/requests/) Python library.How to Run Snippet?-------------------If you copy the code and save it to a file named updateVideoConferencesLook.py, for example, to run it you will need to run:- MacOS/Linux - python3 updateVideoConferencesLook.py- Windows - py updateVideoConferencesLook.pyCode Walkthrough----------------### Load necessary libraries and set up SignalWire client variablesYou will first need to define your own spaceURL, projectID, and authToken variables to be used throughout the code.pythonimport requestsfrom requests.auth import HTTPBasicAuth# TODO: Update these variables with your ownspaceURL = YOURSPACE.signalwire.comprojectID = XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXauthToken = PTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAUTH = HTTPBasicAuth( projectID, authToken)### Prepare the colorsIn this step we prepare the colors that will be used later on in the code to update the light and dark variants of the room. By default weve made it so that all of the colors are set to #FFFFFF (white), but [you can get color palette ideas from Color Hunt](https://colorhunt.co/).pythonclass LayoutColors: def __init__(self, primary, background, foreground, success, negative): self.primary = primary self.background = background self.foreground = foreground self.success = success self.negative = negative# TODO: Pick the colors to useLIGHT_COLORS = LayoutColors( #FFFFFF, # Primary - Used for CTA buttons and selected items. #FFFFFF, # Background - Main background color. #FFFFFF, # Foreground - Main foreground color. #FFFFFF, # Success - Used for success indications. #FFFFFF # Negative - Used for error indications. ) DARK_COLORS = LayoutColors( #FFFFFF, # Primary - Used for CTA buttons and selected items. #FFFFFF, # Background - Main background color. #FFFFFF, # Foreground - Main foreground color. #FFFFFF, # Success - Used for success indications. #FFFFFF # Negative - Used for error indications. )### Get all Video ConferencesHere we create the getData function which we then use to connect to the [List Video Conferences](pathname:///rest/list-video-conferences) endpoint so we can get the list of Video Conferences to update.python# Function to make the request to the url endpointdef getData(url): payload = {} headers = {} response = requests.request( GET, url, headers = headers, data = payload, auth = HTTPBasicAuth( projectID, authToken)).json() allData = response[data] while next in response[links].keys(): response = requests.get( response[links][next], auth=HTTPBasicAuth(projectID, authToken)).json() allData.extend(response[data]) return allDataVIDEO_CONFERENCES_URL = fhttps://{spaceURL}/api/video/conferences# Get all Video ConferencesvideoConferences = getData(VIDEO_CONFERENCES_URL)### Update each Video ConferenceIn the last step of our code we iterate through the list of video conferences, and update each one using the [Update a Video Conference](pathname:///rest/update-a-video-conference) endpoint, along with the color profiles we selected.python# Loop through video conferencesfor conference in videoConferences: payload = { light_primary: LIGHT_COLORS.primary, light_background: LIGHT_COLORS.background, light_foreground: LIGHT_COLORS.foreground, light_success: LIGHT_COLORS.success, light_negative: LIGHT_COLORS.negative, dark_primary: DARK_COLORS.primary, dark_background: DARK_COLORS.background, dark_foreground: DARK_COLORS.foreground, dark_success: DARK_COLORS.success, dark_negative: DARK_COLORS.negative } try: response = requests.put( fhttps://{spaceURL}/api/video/conferences/{conference[id]}, json = payload, auth = AUTH) print(f{conference[display_name]} room colors updated successfully.) except requests.exceptions.HTTPError as errh: print(An Http Error occurred: + repr(errh)) except requests.exceptions.ConnectionError as errc: print(An Error Connecting to the API occurred: + repr(errc)) except requests.exceptions.Timeout as errt: print(A Timeout Error occurred: + repr(errt)) except requests.exceptions.RequestException as err: print(An Unknown Error occurred + repr(err))Wrap up-------Our Video Conference endpoints make it really easy to update everything about them without having to do so manually from your SignalWire Space!Sign Up Here------------If you would like to test this example out, you can create a SignalWire account and space [here](https://m.signalwire.com/signups/new?s=1).Please feel free to reach out to us on our [Community Slack](https://signalwire.community/) or create a Support ticket if you need guidance!