Twitter-API-v2-sample-code icon indicating copy to clipboard operation
Twitter-API-v2-sample-code copied to clipboard

Sample code for the Twitter API v2 endpoints

Results 113 Twitter-API-v2-sample-code issues
Sort by recently updated
recently updated
newest added

``` import requests import os import json # To set your environment variables in your terminal run the following line: # export 'BEARER_TOKEN'='' bearer_token = "XXXXXXXXXXXXXXXXXXXXXXXX" search_url = "https://api.twitter.com/2/tweets/counts/recent" #...

bug

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...

bug

**Describe the bug** [Getting Tweets with Bearer token](https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Tweet-Lookup/get_tweets_with_bearer_token.js) is not working. It returns 403 Forbidden with the following response body: ```json { "client_id": "28572299", "detail": "When authenticating requests to the...

bug

I'm following this [twitter api documentation][1] to get detailed information for a tweet, but I can't seem to get the full tweet details (retweet count, hearts, geotags etc etc) with...

bug

**Describe the bug** Stream encountered HTTP error: 403 HTTP error response text: {"client_id":"*******","detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter...

bug

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /2/tweets (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable'))

bug

![powertrack_flow png twimg 768](https://github.com/user-attachments/assets/94f50f42-2089-4da4-aaf2-34f54d2f9ead) python3 -m venv venv source venv/bin/activate

- [x] **Describe the bug**cx[]() A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: - **Expected behavior @andypiper a** A clear and...

bug

**Describe the bug** I'm using v2 APIs and keep getting this error when calling https://api.twitter.com/2/users/{userid}/following I'm on basic level so should have access to this one. Some other API calls...

bug