Twitter error not authorized

With the rsudp_settings.json file with the correct twitter settings i am getting the following error(s):
[91m2021-08-15 18:22:03 could not send alert tweet - Twitter API returned a 401 (Unauthorized), An error occurred processing your request.←[0m
←[91m2021-08-15 18:22:03 [Tweeter] Waiting 5 seconds and trying to send tweet again…←[0m
2021-08-15 18:22:03 [Plot] Event time: 2021-08-15 18:22:02.81 UTC
2021-08-15 18:22:03 [Plot] Saving png in about 21 seconds
←[91m2021-08-15 18:22:08 could not send alert tweet - Twitter API returned a 401 (Unauthorized), An error occurred processing your request.←[0m

I have entered all the right tokens(as far as I know and believe i verfied them). any ideas to what i am doing wrong?
thank you!

ok…this was fixed…for some reason the original api codes didn’t work.
i generated new ones and now it is posting to twitter.

My other issue is the Extra Text is not getting posted. any ideas?

Hello mcdonron, welcome to the community!

Thank you for explaining what you have done regarding the API codes. It may be of help to other users who find themselves in a similar situation.

Regarding the issue about the extra text, could you please post your RSUDP

rsudp_settings.json

file, and the log file contained in the following folder?

/tmp/rsudp/rsudp.log

In this way, we will be able to see if there is something stopping the action from being executed, or if the problem is connected to something else.

Thank you.

So, I regenerated the Twitter API Tokens and that all worked!! Thank you.
now, as silly as this seems, I can’t seem to add additional “extra_tweet” after checking and double checking everything. Here is the code I used that follows what is documented in the shake twitter settingss:

“tweets”: {
“enabled”: true,
“tweet_images”: true,
“api_key”: “xxx”,
“api_secret”: “xxx”,
“access_token”: “xxx”,
“access_secret”: “xxx”,
“extra_text”: “Raspberry Shake Car Seismic Signature”},

rsudp.log (1.2 MB)

Uploaded log as requested also! thank you!

Hello mcdonron,

Thank you for providing all the details. I have edited the tokens and keys so that no-one will be able to intrude (to use a friendly term) in your personal tweetstream.

From the the .json excerpt that you have sent me it seems that everything is configured properly, and the log is not showing any error about this. I will examine the data further and come back to you tomorrow with, hopefully, a solution.

Thank you for your patience.

Stormchaser,

Thanks-I double, and triple checked…i even tried a few variations such as

“twitter_text”:

“twitter_tweet”:

I also tried the “extra_text”: code right after the “tweet_images”: code just in case.

Still no joy.

I appreciate your help!

By the way, the filtering I am using seems to trigger just cars…can’t wait to start tagging the waveform with an actual picture of a car and

See if there’s any correlation to my hypothesis!

image001.png

image008.png

image009.jpg

image010.jpg

Hello Ron, good morning.

I tried all yesterday to replicate your issue with my two RSUDP installations (one is on a PC, the other is on a Raspberry Pi) but I was, unfortunately, unable to do it.

Even with a completely new environment, my hasty-built bot account would see the extra text that I had put there in the rsudp_settings.json file.

The only thing I can recommend is to delete your current Python environment where RSUDP is, and reinstall everything from scratch. It could be that something was not built properly in the original installation, and a new one could fix this issue.

Ok.
That’s the best thing about this stuff. We
Get
To do it all over again! Only those having fun would do that! Thank you for all the help and will keep you posted!

Thank you.
Sincerely,
Ron McDonald, Account Manager

1 Like

Yes, and we do it over and over, and over, again until everything is perfect!

You’re welcome, and no problem at all.