The fix should be in the last version (228.0.0). Please let us know if this solves the problem.
Original Message:
Sent: 05-06-2025 15:30
From: Edwin Moreno Ramos
Subject: After last update 30th April in the SDK Python we are gettiing this error SSL error "ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:809)".
Hi, guys ,do you have a possible dead line to fix the issue found?
Thanks
------------------------------
Edwin Moreno Ramos
Original Message:
Sent: 05-05-2025 05:35
From: Venkata Hemanth Dogiparthi
Subject: After last update 30th April in the SDK Python we are gettiing this error SSL error "ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:809)".
Hi @Edwin Moreno Ramos
Thanks for poniting the issue. We are troubleshooting the problem and hopefully come back with a root cause and fix for this.
------------------------------
Venkata Hemanth Dogiparthi
Manager, Software Engineering
Original Message:
Sent: 05-02-2025 11:17
From: Edwin Moreno Ramos
Subject: After last update 30th April in the SDK Python we are gettiing this error SSL error "ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:809)".
Hi Community , We need your help about this issue that is happening since the last update in the SDK python with the PureCloudPlatformClientV2.
After the last update on 30th April we are getting the SSL error "ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:809)". As you can see in the image below:

Now, in the python package, genesys have changed the api_client.py file which looks to us is causing the main issue . Inside this .py file, mainly the get_client_credentials_token() and call_api() methods. The first method we are using to generate the access token by passing it the client id and client secret while the second method is being used in most the Apis to call the required Apis by passing the access token to it.
Doing some investigation the team also found specifically where is the issue in the code in the latest PureCloudPlatformClientV2(release 227.0.0). Please see below:
It's the high-lighted code below in PureCloudPlatformClientV2/configuration.py: def create_mtls_or_ssl_context(self):
if self.ssl_context is None: # set_mtls_contents() or set_mtls_certificates() were not called.
ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) If looking at ssl.py below:

The expected parameter for ssl.create_default_context should be: purpose=ssl.Purpose.SERVER_AUTH. Using ssl.Purpose.CLIENT_AUTH is wrong and thus causing the above error we are getting from PureCloudPlatformClientv2.
Please Could you please help to let us know the changes that we need to make in our code to work with these new changes or let us know if the latest code version is faulty and need to be fixed.
Thanks
#PlatformSDK
------------------------------
Edwin Moreno Ramos
------------------------------