Restclient property is not public

Hi I need assistance, Restclient property was public in previous version of .Net PureCloudPlatform.Client.V2 sdk v169.0

but in newer version of sdk v198.1 this property is private

Can you please let me know if anyway i can assign this property from client code?

//
// Summary:
// Gets or sets the RestClient.
//
// Value:
// An instance of the RestClient
private RestClient RestClient { get; set; }

You cannot use rest client with latest versions of genesys cloud.
Refer this link Genesys. NET SDK and update your code

Our organization Genesys api is behind Apigee proxy so we need to set apigee Auth token using restclient
We were able to set with older version but not with newer version

Any suggestions?

Hi @pankajgwl

Between the two version mentioned , there is a major RestSharp Upgrade that has been performed. and
Since the RestSharp upgrade, RestClient object has become lot more light weight with most of the responsibilities transferred to RestClientOptions. You can still set the proxy via exposed ClientOptions class.
Here is a blog post written as part of the upgrade few months back.
(RestSHarp Upgrade BlogPost by HemanthDogiparthi12 · Pull Request #133 · MyPureCloud/developer-center-blog · GitHub)

Here is one such sample.

`var apiClient = Configuration.Default.ApiClient;
var region = PureCloudRegionHosts.eu_central_1;
apiClient.setBasePath(region);

var proxyName = _configuration["ProxyName"];
if (!string.IsNullOrEmpty(proxyName))
{
apiClient.ClientOptions.Proxy = new WebProxy(proxyName, true); // Was apiClient.RestClient.Proxy = new WebProxy(proxyName, true); in previous versions
}`

Please let me know , if you are able to leverage this and set your proxy details.

Refer this Genesys forum

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.