Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

751
Visualizações
Receiving "Stream encountered HTTP error: 403" when using Twitter API. What is causing this error and how can I fix it?

I am very new to using the Twitter API and was testing some Python code (below)

from tweepy import OAuthHandler 
from tweepy import Stream

import twitter_credentials

class StdOutListener(Stream):
    def on_data(self, data):
        print(data)
        return True

    def on_error(self, status):
        print(status)

twitter_stream = StdOutListener(
  twitter_credentials.CONSUMER_KEY, twitter_credentials.CONSUMER_KEY_SECERET,
  twitter_credentials.ACCESS_TOKEN, twitter_credentials.ACCESS_TOKEN_SECERET
)
twitter_stream.filter(track=['#bitcoin'])

but whenever I try to run it, it would give this repeating error "Stream encountered HTTP error: 403". I checked the Twitter API response codes and error 403 was listed as the request is forbidden.

Here are some troubleshooting steps I already took:

  1. tried new access keys/consumer keys
  2. tried to create a new developer account
  3. uninstall and reinstall tweepy

None of these worked for me. So what is causing this error and how can I fix it? Thank you.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

If you have Essential access, you won’t be able to access Twitter API v1.1.

See the FAQ section about this in Tweepy's documentation for more information.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda