Why i am getting time out error while creating deals


#1

Ii am using VB.Net to create deals. I am getting time out error when creating the 3rd deal after creating the first 2 deals successfully. Interestingly when i re-run my program, the failed deal gets created, but again getting time out error for the new 3rd one deal. To simplify the issue, Here is a simple deal json :

{"properties": [{"name": "dealname", "value": "4Q4"}, {"name": "amount", "value": "3140.0000"}, {"name": "closedate", 
"value": "1512000000000"}, {"name": "dealstage", "value": "closedwon"}]}

Here is the C# code i am using:

Dim webRequest = System.Net.HttpWebRequest.Create("https://api.hubapi.com/deals/v1/deal")
webRequest.Method = "POST"

Dim byteArray As Byte() = Encoding.UTF8.GetBytes(MyJsonData)
webRequest.ContentType = "application/json"
webRequest.Headers.Add("Authorization", "Bearer " & AccessToken)

Dim stream As Stream = webRequest.GetRequestStream()
stream.Write(byteArray, 0, byteArray.Length)
stream.Close()

My question is: why i can’t create this deal 3 times with the consecutive 3 api calls? Can you please help?


#2

Hi @Md_Suman_Kabir,

Can you reach out with the error you’re getting?