xdevplatform / Twitter-API-v2-sample-code

Sample code for the Twitter API v2 endpoints
https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api
Apache License 2.0
2.61k stars 967 forks source link

How to solve the bug about issue #69 #154

Open BoYi0126 opened 3 months ago

BoYi0126 commented 3 months ago

This issue pertains to issue #69. This problem has been present since 2021 but has yet to be resolved. Testing through sample code or Postman yields the same result. The result obtained is always "Unauthorized". Does anyone know how to properly utilize API V2.0?

Thank you in advance to all the tech wizards out there.

Sample code: https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Follows-Lookup/following_lookup.py

Error message: Exception: Request returned an error: 401 { "title": "Unauthorized", "type": "about:blank", "status": 401, "detail": "Unauthorized" }