Due to FormUrlEncodedContent's use of Uri.EscapeDataString() internally, it is unable to post values exceeding ~32k in length (Uri.EscapeDataString() is documented to throw UriFormatException if the string length exceeds 32766 characters). Some web services (in this case, Bill.com) require the use of application/x-www-form-urlencoded posts instead of something more sensible, so we have to build up the form body by hand. FormUrlEncodedContent.Encode should use a Uri string encoder not subject to the RFC limits.
Sample reproduction attached.
Sample reproduction attached.