When I am trying to execute SOQL using OAuthRestTemplate Rest API with following URL:


I am getting below error:

[{"message":"\nSELECT+Name+from+Account+where+SAP_ID_UCID__c+=+'1000479'\n ^\nERROR at Row:1:Column:6\nunexpected token: '+'","errorCode":"MALFORMED_QUERY"}]

And also tried encoding the URL and query param. but no luck

but when I execute the same URL in any rest client like post man, it is giving response.

I am doing any wrong in java ? Please help

  • 2
    What's in your actual code? It looks like you might be supplying the query pre-encoded and then having it be encoded a second time. – David Reed May 24 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.