How can I a single cells value using API?

Options

I have the below code, I am trying to get the value a specific cell but I am getting the 1006 error. However if I modify this for a put request, it works without issue? also to note, I am doing this in vb


ย ย Sub GetCompletedCellValue(apiKey As String, sheetId As Long, rowId As Long, columnId As Long)

ย ย ย ย Using client As New HttpClient()

ย ย ย ย ย ย client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", apiKey)


ย  ย  ย  ย  ย  ย  Dim getResponse As HttpResponseMessage = client.GetAsync($"https://api.smartsheet.com/2.0/sheets/{sheetId}/rows/{rowId}/cells/{columnId}").Result


ย ย ย ย ย ย If getResponse.IsSuccessStatusCode Then

ย ย ย ย ย ย ย ย Dim responseContent As String = getResponse.Content.ReadAsStringAsync().Result

ย ย ย ย ย ย ย ย Dim cellData As JObject = JObject.Parse(responseContent)

ย ย ย ย ย ย ย ย Dim cellValue As String = cellData("value").ToString()

ย ย ย ย ย ย ย ย Debug.WriteLine("Current cell value: " & cellValue)

ย ย ย ย ย ย Else

ย ย ย ย ย ย ย ย Debug.WriteLine($"Error getting cell value: {getResponse.Content.ReadAsStringAsync().Result}")

ย ย ย ย ย ย End If

ย ย ย ย End Using

ย ย End Sub

Answers

NEW Smartsheet API Documentation - bookmark the updated link! https://developers.smartsheet.com