Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to Authenticate using OAuth2 for Twitter from Postman

I am trying to send the Single Tweet GET request from Twitter API v2 collection. I used the OAuth2 Authorization Type. When I click on Get New Access Token, after providing the Configuration Options I get the following window:

Something went wrong

But when I click on Back, I am logged in to my Twitter account.

Meanwhile, my Get New Access Token window is still waiting to receive a response:

Waiting for authentication

Has anybody encountered this before?

I've tried using Bearer Token instead and it works without a problem.

I also tried logging out and logging back in from the Twitter login but still did not authenticate successfully.

like image 480
WallE Avatar asked Oct 28 '25 21:10

WallE


1 Answers

For me, it's because I used localhost in my callback URL.

Don’t use localhost as a callback URL Instead of using localhost, please use a custom host locally or http(s)://127.0.0.1

ref: https://developer.twitter.com/en/docs/apps/callback-urls

like image 149
Weiyu Fang Avatar answered Oct 31 '25 11:10

Weiyu Fang