"Could not authenticate you" for querying emoticons in Search API


I have been using Search API for querying several words without any errors. However, when I try to search with a query including emoticons I get the following message:
{“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}

Here are the sample queries and request URLs with the information indicating whether it succeeds or not.
query: boston, URL: https://api.twitter.com/1.1/search/tweets.json?q=boston&count=100&result_type=recent (Successful)
query: :), URL: https://api.twitter.com/1.1/search/tweets.json?q=%3A)&count=100&result_type=recent (Not successful)
query: boston :), URL: https://api.twitter.com/1.1/search/tweets.json?q=boston%20%3A)&count=100&result_type=recent (Not successful)

However, in the documentation (https://dev.twitter.com/docs/using-search) it is indicated that we can search for attitudes.

What might be the problem?


It’s likely an encoding issue with your “)” character in your query – you should encode the “)” character as well as the “:” character.


I am getting couldnot authenticate you code 32 error