API Calls Faling since 1st Dec (TLS Issue ?)

  • 2 December 2016
  • 4 replies
  • 42 views


I have a VB Application that interfaces to the FreshDesk API. This has been working just great until this week when it is failing and I wondered if this is an issue with the recent TLS upgrade.


My code for reading a list of Clients is as follows:


 



Public uRequestUri As String = "https://xxx.freshdesk.com"
Public sAPIKey As String = "[Our API Key]"

Dim uFDConnection = New RestClient(uRequestUri)
uFDConnection.Authenticator = New HttpBasicAuthenticator(sAPIKey, "")
uFDConnection.AddDefaultHeader("Accept", "application/json")

' Get List of Companies
Dim uRequest = New RestRequest("/api/v2/companies?page=1", Method.GET)
Dim uResponse As IRestResponse = uFDConnection.Execute(uRequest)
uCompanies = JsonConvert.DeserializeObject(Of List(Of FreshDesk_Company))(uResponse.Content)
uResponse = Nothing
uRequest = Nothing


 


The return value for uResponse is "The underlying connection was closed: An unexpected error occurred on a send."




As I have not changed anything at my end I assume this is as a result of the recent changes at FreshDesk. Any Ideas ?








This topic has been closed for comments

4 replies


You find any information on this?  I've had unchanged code start failing too.  The AIP calls work using DHC within Chrome but they are returning NULL when I try them in PHP.



Yes I just solved it yesterday. 


After investigating the error message in general terms it seems that this is related to the TLS authentication. I had previously compiled my VB project using .NET 4.5 and by upgrading to .Net 4.6 as the target platform and it all worked again.




Hope that helps




Angus


 



Thanks.  That'll at least narrow down my efforts.



Fixed it by using a newer version of PHP with a newer php_curl and most likely newer SSL libraries.




So it seems based on both of our experience the answer for those who stumble upon this is generally "update whatever you're using as far as SSL libraries".