HTTP POST to api.infusionsoft.com error


Hi All,

I've been trying to complete an oauth token request with infusionsoft. The information seems to be formatted correctly as it successfully completes the Request via Advanced REST API client. The data is formatted as such:

grant_type=authorization_code&code=n3hfg6vn5s2edym24bf2qze6&client_id=5td7rpkx7xuvu4tayzq6pqye&client_secret=3YFwUqtJDC&redirect_uri=https%3a%2f%2fwww.oasischicago.com%2fchicago%2fCallback2.aspx

The error thrown is:

The underlying connection was closed: An unexpected error occurred on a send.

Error Details:

(Inner Exception of 4ea75931-9478-4183-bdfe-ac1ba50e98e3)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
-Env-
eSpaceVer: 9358 (Id=9428, PubId=9270, CompiledWith=8.0.1.75)
RequestUrl: https://www.oasischicago.com/Chicago/Callback2.aspx?code=7z8b7zck7nanwpzasjn5n7fb&scope=full|kd719.infusionsoft.com&state= (Method: GET)
AppDomain: /LM/W3SVC/1/ROOT/Chicago-36-132089824398576000
FilePath: C:\...\PS\running\Chicago.1089693371\InfusionsoftCallback.aspx
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 2344 ('w3wp', Started='7/30/2019 3:50:21 PM', Priv=992Mb, Virt=2586Mb)
TID: 19
Thread Name:
.NET: 2.0.50727.8806

Any thoughts?

Hi Julius,

Typically these kind of errors are problems with setting up a secure connection, firewalls, etc.