huginn: Can't authenticate with Twitter
Twitterâs new API has two sorts of keys/secrets for apps. For example (note: not valid keys đ):
Consumer API keys
H3ihdVN4SZOGuPAodO93rRaGY(API key)1tcII3HFtNAlRGVWGwoxS9reNAVD3CK8heyi5hdpbcC0MxbN5r(API secret key)
Access token & access token secret
26478024-DE1jNpp0OaVcWY3GKr07iDUtGQ8nBCrCblBsNdWic(Access token)Ce2QgHZoKBpDP7PKKuOWOAChcKCqfExHKayuM9myCAyTf(Access token secret)- Read-only (Access level)
Iâve tried plugging both kinds into my .env file (restarting Huginn after) thusly:
TWITTER_OAUTH_KEY=H3ihdVN4SZOGuPAodO93rRaGY
TWITTER_OAUTH_SECRET=1tcII3HFtNAlRGVWGwoxS9reNAVD3CK8heyi5hdpbcC0MxbN5r
When I click the âAuthenticate with Twitterâ button on my Services page, I get âWeâre sorry, but something went wrong.â from Huginn. The production.log has OAuth::Unauthorized (401 Authorization Required) for the âConsumer API keyâ, and the âAccess tokenâ version gives a log entry with OAuth::Unauthorized (403 Forbidden).
Any clues?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 4
- Comments: 17 (1 by maintainers)
Greetings Tom,
I was having the same problem so as a temporary workaround I started using Twurl. If you donât have a shared Huginn instance you can do that too. I blogged about it here: https://antranigv.am/weblog_en/posts/2022/03/tweeting-with-huginn-and-twurl/
Iâm not sure that the actual problem is, since Huginn is not displaying any errors. It might be a change in Twitterâs API.
Currently Iâm trying to deploy older versions of Huginn and see when it broke to check the code change.
Kind regards,
â Antranig Vartanian https://antranigv.am/ PGP Key ID: 0x2D59F21C
Hmm can you post the output from the production log or the docker logs (depending on your setup)?
@MTStrothers The
DOMAINshould be the URL how you are reaching Huginn, this could be the domain name or IP including the port. Assuming your are running Huginn on 127.0.0.1 with port 3000 the callback URL on twitter should behttp://127.0.0.1:3000/auth/twitter/callback