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

175
Views
Twitter API V2.0 returning response with code 203

I'm building an app using the Twitter API V2.0 to get user info by username and it is returning me a code 203 response.

Code:

const { TwitterApi } = require('twitter-api-v2');
const twitterClient = new TwitterApi(tokens.BEARER);
const roClient = twitterClient.readOnly;

const user = await roClient.v2.userByUsername('plhery');
console.log(user);

Response:

(node:404) UnhandledPromiseRejectionWarning: Error: Request failed with code 403
    at RequestHandlerHelper.createResponseError (C:\Users\IGOR\Documents\Code\Node\famoso_falou\node_modules\twitter-api-v2\dist\client-mixins\request-handler.helper.js:73:16)
    at IncomingMessage.<anonymous> (C:\Users\IGOR\Documents\Code\Node\famoso_falou\node_modules\twitter-api-v2\dist\client-mixins\request-handler.helper.js:114:33)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:404) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:404) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
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!