Hello @Venkata Hemanth Dogiparthi,
Thank you for your quick reply, I really appreciate your assistance.
We are currently working on an integration between our application and Genesys Cloud using the PureCloudPlatform.Client.V2 library, following instructions from the Genesys Cloud online documentation and relevant GitHub samples.
The integration operates as expected when our backend server communicates directly with Genesys Cloud (i.e., without a proxy). However, we encounter issues when a proxy is involved in the customer's environment. Specifically, while requests from our application successfully reach Genesys Cloud (evidenced by changes in routing status observable on the Genesys Web UI), the expected notifications (such as agent status changes or call status updates) fail to reach our application.
We suspect that the SDK handles proxy configuration by querying the server's OS settings, without the need for additional code. Nevertheless, we attempted to configure the NotificationHandler as per the methods mentioned in this GitHub repository. Note that the customer's proxy does not require authentication.
Unfortunately, none of our attempts have been successful.
Could you advise on whether additional coding is necessary to support proxy use in this context, or if specific proxy configurations are required?
If proxy configuration is needed, could you inform us of which ports and addresses (or subdomains) the SDK requires to communicate freely with the server?
Below is an extract from our code:
clientApiClient = new ApiClient(apiBasePath);
clientConfiguration = new Configuration(clientApiClient);
clientConfiguration.AuthTokenInfo = new AuthTokenInfo()
{
AccessToken = token,
TokenType = "Bearer",
ExpiresIn = 3600,
};
notificationsApi = new NotificationsApi(clientConfiguration);
userMe = userApi.GetUsersMe();
notificationHandler = new NotificationHandler(notificationsApi, http://proxy.loc:8080);
notificationHandler.AddSubscription($"v2.users.{userMe.Id}.routingStatus", typeof(UserRoutingStatusUserRoutingStatus));
notificationHandler.AddSubscription($"v2.users.{userMe.Id}.conversations.calls", typeof(ConversationCallEventTopicCallConversation));
notificationHandler.AddSubscription($"v2.users.{userMe.Id}.conversations.callbacks", typeof(ConversationCallbackEventTopicCallbackConversation));
notificationHandler.AddSubscription($"v2.users.{userMe.Id}.activity", typeof(AgentActivityChangedTopicAgentActivity));
notificationHandler.AddSubscription($"v2.users.{userMe.Id}.presence", typeof(PresenceEventUserPresence));
Any advice you could provide would be invaluable to us.
Kind regards,
Slobodan
------------------------------
Slobodan Cukalovic
Solution Architect
------------------------------
Original Message:
Sent: 08-12-2025 14:08
From: Venkata Hemanth Dogiparthi
Subject: Using web proxy for integration through PureCloudPlatform.Client.V2 SDK does not works
Hi @Slobodan Cukalovic
Can you paste SDK client code that you have used to connect to the APIs via web proxy . By web proxy I assume you mean a forward proxy which just forwards the requests and not an API gateway where you need to do mapping of paths.
we have good documentation on setting up proxy in our SDK readme.
For example this is Java script sdk for setting up the proxy
https://github.com/MyPureCloud/platform-client-sdk-javascript
const {HttpsProxyAgent} = require('hpagent')const client = platformClient.ApiClient.instance;agent = new HttpsProxyAgent({ proxy: proxyUrl,});client.setProxyAgent(agent)
Here are some troubleshooting steps that can be done.
- Make sure there is network conenction intact between proxy and Genesys Hosts.
- Check the logs in PROXY , see the HTTP (OR https) request that is sent to Genesyscloud. Compare if there are any missing headers or the request protocol itself is modified as the error suggests. Check why the CONNECT request fails at Proxy.
- Do a sample curl from client's terminal , proxying the request and without proxying. (Just used login API as an example here.)
curl -x http://{proxy-url}:8080 -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -d '{""grant_type={}""}' https://{genesys-host}/oauth/token"
If this returns 400 The plain HTTP request was sent to HTTPS port, the proxy is not handling the CONNECT method correctly.
pleas provide your SDK client connection code , so that we can help better.
------------------------------
Hemanth Dogiparthi
Manager, Software Engineering
------------------------------