Best answer

API Query action returns "query string has to be specified"

  • 17 March 2023
  • 2 replies

Userlevel 1

Hi, I am trying an API action in Salesforce but it keeps returning 400 error:

  • {"message":"A query string has to be specified","errorCode":"MALFORMED_QUERY"}


When I issue a plain curl query it returns the right values:

  • curl -H "Authorization: Bearer xxxxxxxxx"


So I am unsure how to setup parameters in Zapier to get the results:




Best answer by Saravana 17 March 2023, 19:32

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +8

Hi @Saravana 


Im guessing you are actually replacing the MyDomainName in the URL but just have it here like this so you can share it? 


Also, on the left hand side of the query string, just put q not “QueryString” and no need to encode them 

Userlevel 1

Yes correct, I am using MyDomainName to hide my actual domain

I tried it like you said and it worked - thanks! I did not realise that you don’t need to encode the query.