Add support for Twitter API v2 #544

Open
opened 2021-12-18 10:27:09 -08:00 by LinqLover · 1 comment
LinqLover commented 2021-12-18 10:27:09 -08:00 (Migrated from github.com)

As of 2021-11-15, new users can only use the v2 version of the API unless they are granted elevated access:

Twitter API returned a 403 (Forbidden), You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve

Unfortunately, twython appears to be hard-coded to v1, or at least I did not find out how to use the v2 endpoints. It would be great if support or docs for this could be added!

As of 2021-11-15, new users can only use the v2 version of the API unless they are granted elevated access: > Twitter API returned a 403 (Forbidden), You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve Unfortunately, twython appears to be hard-coded to v1, or at least I did not find out how to use the v2 endpoints. It would be great if support or docs for this could be added!
ryanmcgrath commented 2021-12-18 22:45:33 -08:00 (Migrated from github.com)

Ah, damn, that's crazy.

Unfortunately I just don't use Twython myself much these days... so this isn't something I can devote my time to. If someone wanted to update the library to use v2 endpoints I'm happy to review and merge though; endpoints.py is fairly well laid out and unless much has changed with the authentication rituals, it should just be a matter of updating that (or creating an endpoints_v2 of sorts) and tweaking the main lib slightly to use it.

Ah, damn, that's crazy. Unfortunately I just don't use Twython myself much these days... so this isn't something I can devote my time to. If someone wanted to update the library to use v2 endpoints I'm happy to review and merge though; `endpoints.py` is fairly well laid out and unless much has changed with the authentication rituals, it should just be a matter of updating that (or creating an `endpoints_v2` of sorts) and tweaking the main lib slightly to use it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#544
No description provided.