Hi, very new to Twitter Api. Trying to use statuses/update.json with Postman to post update to the same account as twitter app and getting 401 and Invalid or expired token every time.
Just to validate:
Consumer key and secret are taken from App’s " Consumer API keys" section
Access key and secter for App’s " Access token & access token secret" section, ones which could only be seen once.
As seen on screenshot I use Postman {{$timestamp}} variable to keep time in-sync and {{$guid}} (e.g “611c2e81-2ccb …” for Nonce. I have also tried to omit timestamp and nonce because I seen it is omitted in some tutorials.
I far as I understand Postman does oauth_signatiue generation for me according to Oath specs which should be good for Twitter. Or an I wrong here?
I have very new App (id 17993386), can this me the reason?
Postman is easy to make mistakes in OAuth signature Creating a signature | Docs | Twitter Developer Platform and authorization Authorizing a request | Docs | Twitter Developer Platform
Twurl is a better option for testing calls GitHub - twitter/twurl: OAuth-enabled curl for the Twitter API
Remember to save your access token and secret, they do not expire, just get hidden in the user interface. twurl stores these in a .twurlrc file
Thanks, tried. Getting an exception (see issue 149 in wurl repo) on every call after authentication.
Any other suggestion?
oh weird - this one right? Crash with `alias_from_name': undefined method `[]' for nil:NilClass (NoMethodError) · Issue #149 · twitter/twurl · GitHub if you’re on windows i’d check if the .twurlrc file was created correctly and is readable from where twurl is being run. Or i’d try ruby 2.5.1 - i know it works in that for sure.
Yes, weird. Anyhow I’ve managed to get it working with Postman. Not sure what caused the issue. Maybe regeneration of tokens and secrets helped.
1 Like
system
Closed
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.