Oddly getting error 32, could not authenticate you


#1

My Oauth params and headers is properly set up as i get results from the following API call

https://api.twitter.com/1.1/search/tweets.json?q=ladygaga&result_type=recent&count=5&lang=en

But i want to change the query to include “from:ladygaga”

https://api.twitter.com/1.1/search/tweets.json?q=from%3Aladygaga&result_type=recent
&count=5&lang=en

And this API call is when i get the 32 erorr.

Any help would be great appreciated. I prefer to use Standard vs Premium which works.


#2

If ladygaga works but from:ladygaga does not, you are probably not encoding the : correctly. Maybe checkout the OAuth encoding guide.


#3

Thanks for replying. I already tried that as you can see from my original post. Am i misinterpreting how to encode : ? %3A should work.

Thanks again


#4

I was just able to make a successful request with this API call:
https://api.twitter.com/1.1/search/tweets.json?q=from%3Aladygaga

Error 32 probably means that you are experiencing some issues with your authentication. Can you please make sure that you are using the proper tokens?


#5

Thanks for replying.

I am using postman and it generates the Oauth token using my keys/tokens as:

OAuth oauth_consumer_key=“xxxxxxx”,oauth_token=“xxxxxxx”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1539976256”,oauth_nonce=“ksnnGABeH54”,oauth_version=“1.0”,oauth_signature=“xxxxxx”

using the same OAuth tokens, i can easily access https://api.twitter.com/1.1/users/search.json?q=ladygaga with results. I do believe it has to be the encoding of from:ladygaga but i am stumped as it why its not working.


#6

@davidslee9 hey david I’ve had the same issue before with error 32s, it’s generally to do with making sure the URL is properly encoded, Twitter’s encoder appears to have an issue with colons.


#7

We have found that Postman is not the most reliable way to generate Oauth tokens. I recommend for you to use an Oauth library (example) or Insomnia instead.

@dannolan - I don’t believe that this is an error with our encoder, as I was able to successfully make a request using https://api.twitter.com/1.1/search/tweets.json?q=from%3Aladygaga


#8

THANK YOU. I guess it was Postman and how they generate Auth tokens. I used Insomnia and it worked. Thank you again


#9

Glad its working for you! We will engage with Postman to prevent this from happening in the future.


#10