{"id":8039,"date":"2025-09-04T23:22:34","date_gmt":"2025-09-05T04:22:34","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=8039"},"modified":"2025-09-04T23:23:55","modified_gmt":"2025-09-05T04:23:55","slug":"configuring-proxy-credentials","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-net-sdk\/creating-the-application-framework\/configuring-proxy-credentials\/","title":{"rendered":"Configuring Proxy Credentials"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"introduction-to-proxy-credentials\">Introduction to Proxy Credentials<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To support requesting data from external sources via the internet, some proxy servers may require specific credentials for access. To support this configuration, the TT .NET SDK requires access to the user&#8217;s proxy credentials to make the required requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: In order to connect to a proxy server that requires credentials, you must configure a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.ProxyCredentialsHandler.html\">ProxyCredentialsHandler<\/a>&nbsp;when creating your application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuring-the-proxycredentialshandler\"><a href=\"\/tt-net-sdk\/articles\/af-proxy-credentials.html#configuring-the-proxycredentialshandler\"><\/a>Configuring the ProxyCredentialsHandler<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When connecting to a proxy server that requires credentials, the TT .NET SDK requests the credentials from the application via the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.ProxyCredentialsHandler.html\">ProxyCredentialsHandler<\/a>. The credentials provided by the application will be handed to the proxy which, if valid, should allow the TT .NET SDK to access the external internet resources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.ProxyCredentialsHandler.html\">ProxyCredentialsHandler<\/a>&nbsp;defined in the TTAPI object provides the mechanism to pass proxy credentials to the SDK. When creating your application, configure the handler and pass it into the CreateTTAPI method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This is an optional handler and may be omitted if the application does not need to support proxies that require credentials.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"proxycredentialshandler-example\"><a href=\"\/tt-net-sdk\/articles\/af-proxy-credentials.html#proxycredentialshandler-example\"><\/a>ProxyCredentialsHandler example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following code snippet demonstrates an example of this process.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public void Init(tt_net_sdk.TTAPIOptions TTAPIOptions)\n{\n    \/\/ hook up the handler for when the TTSDK is initialized \n    ApiInitializeHandler apiInitHandler = new ApiInitializeHandler(ttApiInitComplete);\n    \/\/ hook up the proxy handler to account for the potential need for \n    \/\/ proxy login credentials to make external https requests &amp; websocket connection\n    ProxyCredentialsHandler proxyHandler = new ProxyCredentialsHandler(OnProxyCredentials);\n    TTAPI.CreateTTAPI(tt_net_sdk.Dispatcher.Current, TTAPIOptions, apiInitHandler, proxyHandler);\n}\n\npublic void OnProxyCredentials(CredentialsNeededEventArgs e)\n{\n    \/\/ supply the SDK with the appropriate credentials for the proxy login\n    \/\/ application to decide how to acquire the data from the user\n    \/\/ once the creds are known,set the values in the CredentialsNeededEventArgs\n    e.UserName = \"username_for_proxy\";\n    e.UserPwd = \"userpassword_for_proxy\";\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"overriding-the-system-configured-proxy\"><a href=\"\/tt-net-sdk\/articles\/af-proxy-credentials.html#overriding-the-system-configured-proxy\"><\/a>Overriding the system configured proxy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can override the system configured proxy by setting the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TTAPIOptions.html#tt_net_sdk_TTAPIOptions_ProxyUri\">TTAPI.ProxyUri<\/a>&nbsp;property equal to the Uniform Resource Identifier of your desired proxy server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to Proxy Credentials To support requesting data from external sources via the internet, some prox [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-net-sdk","meta":{"_acf_changed":true,"footnotes":""},"docs-category":[770],"class_list":["post-8039","doc","type-doc","status-publish","hentry","docs-category-creating-the-application-framework"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8039\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=8039"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=8039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}