Query Secured FeatureServer Layer returns "Invalid URL"

Discussion created by deleted-user-1T_bOHag6M8d on Aug 1, 2012
I've created a web application using the Javascript API that sends a call to the REST API for a secured FeatureServer layer. The URL of the call is:<<token removed>>

The response from the server is:
{"error":{"code":400,"message":"Unable to complete  operation.","details":["Invalid URL"]}}

I've played around with removing different parameters from the URL and this error only occurs with the token parameter specified. I've checked the Verbose server logs in ArcGIS Server Manager, but I see no errors there.