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.

Can't authenticate

See original GitHub issue

The authentication works perfectly with twit, but with twitter-lite all the request I tried were denied.

I used the basic example.

If I do the user authentication as following:

client = new Twitter({ consumer_key, consumer_secret, access_token, access_token_secret });

The output is:

{ _headers: Headers { [Symbol(map)]: [Object: null prototype] { 'cache-control': [Array], connection: [Array], 'content-encoding': [Array], 'content-length': [Array], 'content-type': [Array], date: [Array], server: [Array], 'set-cookie': [Array], 'strict-transport-security': [Array], 'x-connection-hash': [Array], 'x-response-time': [Array] } }, errors: [ { code: 89, message: 'Invalid or expired token.' } ] }

If I include the bearer_token in the constructor, the output is this:

{ _headers: Headers { [Symbol(map)]: [Object: null prototype] { 'cache-control': [Array], connection: [Array], 'content-encoding': [Array], 'content-length': [Array], 'content-type': [Array], date: [Array], server: [Array], 'set-cookie': [Array], 'strict-transport-security': [Array], 'x-connection-hash': [Array], 'x-response-time': [Array] } }, errors: [ { message: 'Your credentials do not allow access to this resource', code: 220 } ] }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

2reactions
xmkevinchencommented, Nov 11, 2020

I got the same issue reported, however, not all my requests failed, it’s just some of them. I wonder whether I should create the client for every API request, instead of using the same client instance for all requests with the same tokens. (To me, ideally, they should be the same, though)

2reactions
flleeppyycommented, Aug 23, 2020

Yep, same here as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I received the “Unable to authenticate” or “Failed to log ...
I received the “Unable to authenticate” or “Failed to log in” message · Android: Tap Settings > Apps > Pokémon GO > Force...
Read more >
How to easily fix 'Unable to Authenticate' issue in Pokemon ...
How to fix the 'Unable to Authenticate' error message · Go to 'Settings,' 'Apps,' and check Pokemon Go. · Open app information and...
Read more >
"Unable to authenticate" or "Failed to log in" error when ...
Go to Pokemon.com, and select Log In from the left-hand navigation bar. · Enter your username and password, and then verify you have...
Read more >
5 Ways to Fix Wi-Fi Authentication Problems on Android
A quick fix to Wi-Fi authentication problems on Android is to toggle airplane mode on and off, or "forget" the Wi-Fi network and...
Read more >
WiFi Authentication Errors and Methods to Solve Them
An authentication error occurs when a device can't connect to WiFi. Learn about what causes WiFi authentication problems and how to fix ...
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