Beginner help request - the Twiter example

I am brand new to this, so thanks in advance. I am trying to complete the sample code that sends the temperature to twitter (

I believe I followed the instructions to the letter on the Imp Central UI and Twitter, but when I run the code, the log keeps returning " {“errors”:[{“code”:215,“message”:“Bad Authentication data.”}]}"

I’ve purged the app, deleted the Twitter app and recreated evertying, but the issue persists.

Can someone suggest where I am going wrong?


There are a couple of possibilities, @macollins: either you haven’t entered the four Twitter app security codes correctly, and Twitter is rejecting your attempt to send a tweet, or the Twitter API has changed. I can’t see anything obvious in the latter, so I’d recommend first that you check your Twitter app secrets and make sure you’re using them to replace everything within the double-quote marks in the same code, ie. don’t leave the < and > behind, eg.

tweeter = Twitter("123456789", ...


tweeter = Twitter("<123456789>", ...

Hello @smittytone,

Thanks, that’s exactly what I had done. it’s working perfectly now.

Now to start exploring the motion sensor.