Twitter API issue?

38 views
Skip to first unread message

pco...@suremail.gg

unread,
Jul 19, 2023, 4:03:42 AM7/19/23
to pywws
Hi all,

Just noticed that my weather station stopped Tweeting at 9pm last night, and as far as I can see, all such weather stations stopped at the same time.
Looks like Mr Elon made a change to the API situation, which now HAS stopped all such stations tweeting the weather hourly.

What a shame......

Regards

Phil Cooper

Peter Mount

unread,
Jul 19, 2023, 5:02:48 AM7/19/23
to pywws
I stopped using Twitter a while ago for my station (it's now on Mastodon) but I checked those I know were still posting there and they all stopped at 9pm.

Jim Easterbrook

unread,
Jul 19, 2023, 5:05:14 AM7/19/23
to 'pco...@suremail.gg' via pywws
On 19/07/2023 09:03, 'pco...@suremail.gg' via pywws wrote:
>
> Just noticed that my weather station stopped Tweeting at 9pm last night,
> and as far as I can see, all such weather stations stopped at the same time.
> Looks like Mr Elon made a change to the API situation, which now HAS
> stopped all such stations tweeting the weather hourly.

Yup, mine also failed at 9pm last night. My log file shows:

"You currently have access to a subset of Twitter API v2 endpoints and
limited v1.1 endpoints (e.g. media post, oauth) only. If you need access
to this endpoint, you may need a different access level. You can learn
more here: https://developer.twitter.com/en/portal/product"

I've gone to that link and followed the process to change the access
level (no money changed hands!) which might have some effect. I'm not
sure if I'm willing to put any effort into making it work again.

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Jim Easterbrook

unread,
Jul 19, 2023, 7:08:29 AM7/19/23
to py...@googlegroups.com
On 19/07/2023 10:05, Jim Easterbrook wrote:
>
> I've gone to that link and followed the process to change the access
> level (no money changed hands!) which might have some effect.

Nope. I also tried reauthenticating pywws to post to its Twitter account
but that hasn't helped either.

pco...@suremail.gg

unread,
Jul 19, 2023, 11:53:23 AM7/19/23
to py...@googlegroups.com
Hi Jim and the group,

I just followed the link you provided, and explained my usage of Twitter for the weather app, opting for the FREE account, and when I go through the process, it seems to imply that my account (and it does show the current API I am using) has exceeded the 1500 Tweets per month, and that it will be reset on August 19th at 00:00UTC.

I will leave it running, and see if that comes true.
If it does, I may have to remove some (or all!) of the graphs that get Tweeted, such as the midnight summary of the last 24 hours, the 8am wind direction for the previous day, et etc.
Even then, I suspect that just Tweeting the weather hourly over one month will exceed 1500 Tweets.

So, maybe just leave your Pi running for now, and see what happens on August 19th.

Regards

Phil Cooper

--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/6cb7ff4d-cfb4-7ec7-d380-ebbdce464fbc%40jim-easterbrook.me.uk.


Peter Mount

unread,
Jul 19, 2023, 11:59:55 AM7/19/23
to pywws
For a 31 day month 1500 tweets equates to one every 30 minutes (actually comes to 1488) so a weather station posting once an hour with the odd additional post shouldn't go anywhere near that limit

Jim Easterbrook

unread,
Jul 19, 2023, 12:02:18 PM7/19/23
to py...@googlegroups.com
On 19/07/2023 16:53, 'pco...@suremail.gg' via pywws wrote:
>
> I just followed the link you provided, and explained my usage of Twitter for the weather app, opting for the FREE account, and when I go through the process, it seems to imply that my account (and it does show the current API I am using) has exceeded the 1500 Tweets per month, and that it will be reset on August 19th at 00:00UTC.

Ah, light dawns. I thought "1500, that's plenty" when I saw that but it
isn't. Hourly updates for a month is up to 744, but when you multiply
that by the number of tweeting pywws users...

If it's a limit per app rather than a limit per user then the solution
will be for each pywws user to become a Twitter developer and get their
own consumer_key and consumer_secret.

JAMES COOPER

unread,
Jul 19, 2023, 12:49:32 PM7/19/23
to pywws
Just Googling around this issue, I've come across a page that says...

"You can check your usage towards the monthly Tweet cap by viewing the main dashboard page in the developer portal. Under the name of your Project, you'll see a status bar that illustrates your current month’s usage in relation to the Tweet cap. You will also see the number of Tweets you pulled this month, the percentage of Tweets used in relation to the cap, and the date your Tweet cap usage resets."

In case the links don't work, the "main dashboard page" is https://developer.twitter.com/content/developer-twitter/en/portal/dashboard
This might go some way to verify your theory on the limit per app rather than per user, Jim.

Jim Easterbrook

unread,
Jul 19, 2023, 1:26:28 PM7/19/23
to py...@googlegroups.com
On 19/07/2023 17:49, 'JAMES COOPER' via pywws wrote:
> /
> /
> /"//You can check your usage towards the monthly Tweet cap by viewing
> the main dashboard page
> <https://developer.twitter.com/content/developer-twitter/en/portal/dashboard> in the developer portal <https://developer.twitter.com/en/docs/developer-portal>. Under the name of your Project, you'll see a status bar that illustrates your current month’s usage in relation to the Tweet cap. You will also see the number of Tweets you pulled this month, the percentage of Tweets used in relation to the cap, and the date your Tweet cap usage resets."/

That's interesting. However the cap it's showing is the cap on Tweets
"pulled", i.e. viewed/downloaded. As you'd expect pywws' usage is
currently zero, as it only posts Tweets.

Elsewhere though the developer portal confirms that the app is allowed
up to 1500 posts per month. We're going to have to move to each pywws
user creating their own project & app.

Or not bother and declare pywws' Twitter service dead.

JAMES COOPER

unread,
Jul 24, 2023, 5:20:11 AM7/24/23
to pywws
I've got little idea of the back-end effort needed to revive the Twitter (or 'X' - eugh) side of things, but I think it would be a shame to lose it.  Appreciate it's probably worth waiting until the dust settles a little though.

pco...@suremail.gg

unread,
Jul 27, 2023, 5:55:22 AM7/27/23
to pywws
A silly question.... Do we all have the same  Twitter API for this app?
I seem to recall (when originally setting up pywws) that we had to generate a key, but I now can't find that info in your docs Jim.

I'm also puzzled as to which version of the Twitter API we are using. I'm assuming mine is python-oauth2 but I'm not sure how to check that.
In my pywws.log file, I have this line cropping up since it failed:
TwitterError([{u'message': u'You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product', u'code': 453}],)
I have no idea what that means, but the link only takes me to the dashboard page again.

Sadly, the Twitter developers page isn't very informative on how to access the free version, as it implies I am already using the free version.

Cheers

Phil Cooper

Jim Easterbrook

unread,
Jul 27, 2023, 1:24:16 PM7/27/23
to py...@googlegroups.com
On 27/07/2023 10:55, 'pco...@suremail.gg' via pywws wrote:
> A silly question.... Do we all have the same  Twitter API for this app?
> I seem to recall (when originally setting up pywws) that we had to
> generate a key, but I now can't find that info in your docs Jim.

The process, as far as I remember is this.
1/ The developer (that's me) registers as a developer with Twitter.
2/ The developer registers an "app" with Twitter who issue a "consumer
key" and "consumer secret". These identify the app to Twitter as pywws.
3/ The user (that's you, and me) creates a Twitter account and then
authorises pywws to post to that account. Twitter issues an oauth token
and oauth token secret which are stored in your weather.ini as key and
secret. These identify the user to Twitter.

> I'm also puzzled as to which version of the Twitter API we are using.
> I'm assuming mine is python-oauth2 but I'm not sure how to check that.

python-oauth2 is used to get the access tokens.

> In my pywws.log file, I have this line cropping up since it failed:
> TwitterError([{u'message': u'You currently have access to a subset of
> Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post,
> oauth) only. If you need access to this endpoint, you may need a
> different access level. You can learn more here:
> https://developer.twitter.com/en/portal/product', u'code': 453}],)
> I have no idea what that means, but the link only takes me to the
> dashboard page again.

That means that the total number of pywws tweets is limited to 1500 per
month, unless I move it up to the next access level by paying them $100
per month.
Reply all
Reply to author
Forward
0 new messages