Have you tried using the twApi_DisableEncryption() function when trying to run under an HTTP context? Just exercise that before you initialize the api. For example, in the SteamSensor example provided with the C SDK, this would be called in the main executable loop somewhere near the top of that function.
Well, it's sort-of the right answer...
I modified Main.c accordingly, but it didn't resolve the problem. So, I commented out the twApi_DisableEncryption() function. After recompiling, the RPi successfully connected and presented an unbound thing within ThingWorx. The RPi could not find a 'thing' called SteamSensor1 and threw errors. Not sure what was amiss with main.c, but it seems to be getting past the connection issue. I created a 'thing' SteamSensor1 and data started to flow. I also put together a quick mashup to see data updating accordingly.
Next up is to work through the PIDataCollector example and go off-road from there.