I am trying to generate signature in order to connect to twiiter search api but i am getting could not authenticate you can you please help me with this
You can generate your own keys in the App settings https://developer.twitter.com/en/apps details under “Keys and tokens” so you don’t have to use any Oauth APIs to just use the Search API.
If you’re getting errors when signing & making calls to the search api it’s probably something else.
I have tried to follow twitter search api documentation in the api call it is asking for auth signature and auth nonce i have tried to use current time now but i am getting could not authenticate you status code :32.
You can use a Library in your preferred language to help you make and authenticate calls to the API https://developer.twitter.com/en/docs/developer-utilities/twitter-libraries.html instead of trying to do it yourself, it’s way easier that way.
ok i will try implementing this but if i have to do this on my own then what approach should i follow?
I’d avoid re-implementing things like oauth / adding headers to http calls etc. and use an already working library like https://github.com/geduldig/TwitterAPI but if you really want to do things from scratch, taking an existing library and looking at how things are implemented there should be a good approach to take.
Ok i am trying to implement twitter api in react native and so the library mentioned is not helping me so want to know the way how it can be implemented
can you tell me that the bearer taken obtained from twitter oauth2/token api will expire in how many days?
They don’t expire unless revoked: https://developer.twitter.com/en/docs/basics/authentication/FAQ
Have a look at this too for how to store them: https://developer.twitter.com/en/docs/basics/authentication/guides/securing-keys-and-tokens.html
thanks for the help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.