'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.



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Weiyu Fang