question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

401 Unauthorized when streaming

See original GitHub issue

I’m getting a 401 error, but only when using the StreamListener. Normal API calls work fine.

My Twitter account is set to the same timezone as my dev machine, and I still get 401 errors when I run my code on Heroku’s servers. What gives? Is Tweepy still hitting v1 API endpoints?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
andrewkchancommented, Dec 31, 2020

I switched to python-twitter, you may want to try that instead.

2reactions
berkay-dincercommented, Aug 13, 2017

I was able to figure out the issue after days of debugging. Turns out this is related with the way I read the keys from the property file. Somehow python inserted a subtle ’ character to the beginning and end of the keys.

What lead me to the wrong direction is that this was not immediately obvious for some reason (caching mechanism?) on Twitter side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 401 Unauthorized Error - Lifewire
A 401 Unauthorized error means the page you were trying to see needs a valid user ID/password before you can view it.
Read more >
How to fix unauthorized 401 error when watching IPTV?
Error shows up on your screen: "Unauthorized 401". You know your internet is fine, you know your subscription is valid.
Read more >
API: What Does the 401 Error Mean? - Livestream Help Center
Ensure that your server code returns the generated timestamp (in epoch milliseconds ) so that you are using the same timestamp in your...
Read more >
Collect Code - 401 Unauthorized error on Streaming Updates
Navigate to Admin --> Implementation; Within the Implementation page, locate "Streaming Updates"; Under the Streaming Updates header, ensure the ...
Read more >
401 UNAUTHORIZED | OBS Forums - OBS Studio
I just got a notification when i opened up PBS for StreamElements. It says "Failed to load channel information for Twitch.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found