1

We were using oAuth V2 and when Twitter updated the tiers to "free, basic, pro and enterprise", our app got suspended and our oAuth stopped working.

We are using the Twitter-API-V2 lib found here: https://www.npmjs.com/package/twitter-api-v2

So, we paid for basic account, and I then deleted our old suspended app and made a new one and put in the correct ClientID and ClientSecret env vars to update our Vercel project that handles this.

I am still getting {“errors”: [{“code”: 32,“message”: “Could not authenticate you.”}]}

I triple checked everything on the user authentication settings in the Twitter dev console were correct and specifically the callback URLs are correct (quadruple checked our code callback with the ones I listed for each environment).

What is going on!?

I am trying to allow people to just oAuth into their accounts at this point. This has been working all year and last with this lib the way we have it set up (using the client_id and client_secret). Sigh.

Please help!

Steps I did:

I deleted the suspended app

I paid for basic level twitter api v2

I made another app

I put the client_id and client_secret into our env vars for our Vercel project to use with our npm package lib (https://www.npmjs.com/package/twitter-api-v2)

I checked the callback URLs on the dev portal on twitter 4x to ensure they matched code and environment

I tried to oAuth on our UI (which has been working for over a year and suddenly this stopped)

The console error I see is(and I checked our stage and production environments--same error):

{"type":"response","code":401,"error":{"errors":[{"code":32,"message":"Could not authenticate you."}]},"headers":{"date":"Fri, 16 Jun 2023 19:34:54 GMT","perf":"7626143928","pragma":"no-cache","server":"tsa_b","status":"401 Unauthorized","expires":"Tue, 31 Mar 1981 05:00:00 GMT","set-cookie":["guest_id=v1%3A168694409451671531; Max-Age=34214400; Expires=Tue, 16 Jul 2024 19:34:54 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None"],"content-type":"application/json; charset=utf-8","cache-control":"no-cache, no-store, must-revalidate, pre-check=0, post-check=0","last-modified":"Fri, 16 Jun 2023 19:34:54 GMT","x-transaction":"adc3258f3c9ac858","content-length":"89","x-frame-options":"SAMEORIGIN","content-encoding":"gzip","www-authenticate":"OAuth realm=\"https://api.twitter.com\", api_error_code=32","x-transaction-id":"adc3258f3c9ac858","x-xss-protection":"0","content-disposition":"attachment; filename=json.json","x-content-type-options":"nosniff","x-twitter-response-tags":"BouncerCompliant","strict-transport-security":"max-age=631138519","x-response-time":"5","x-connection-hash":"b053c1c53979603cf75a4ba2847249291371c3b92395e5cbead3e9866e77bd4e","connection":"close"}}}
NatureLady
  • 81
  • 1
  • 7

0 Answers0