Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
I am getting " 'Request token missing': '' " error when trying to setup a client

I know that there is a very similar question like this one on StackOverflow, but i do not understand what the answer means, and because of that i am asking this question.

here's my code

const tokens = JSON.parse(fs.readFileSync("./tokens.json"));

const { accessToken, accessSecret, oauth_verifier } = tokens;

const client = new TwitterApi({
    appKey: process.env.API_KEY,
    appSecret: process.env.API_KEY_SECRET,
    accessToken: accessToken,
    accessSecret: accessSecret
});

const {client: Bot} = await client.login(oauth_verifier);

running this throws a 401 error with data saying Request token missing: ''.

i believe the problem lies in the oauth_verifier, as the code runs fine, and i have checked all my other credentials. I can also run a console.log() without running into errors if the last line in my code block above is commented.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!