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
------------------------------