Desktop applications only support the oauth_callback value 'oob'/oauth/request_token

Solution 1:

Fill up the "Callback URL" field in your Twitter settings dev account.

Solution 2:

In addition to what the other answer says...

I kept getting an error when trying to fill up the Callback URL in the Twitter dev console. I was trying to enter http://localhost:4000, but it was giving me errors. If you need to need to use localhost, you can use http://127.0.0.1:4000 instead, and Twitter accepts that.

(Maybe obvious to some, but took me a little while to figure it out.)

Solution 3:

This is an old question, but I ran into this error today, and the thing I noticed is that NEW Twitter applications can be saved WITHOUT a callback URL, but as soon as you save your app with a callback URL, Twitter won't let you save it -- it will revert to the last URL you had. In our case, it didn't matter since our OAuth flow supplies the callback URL, but something on Twitter's side of things REQUIRES that there be a callback URL (ANY callback URL). So in our case, this error cropped up only in dev environments that had a new (and unused) Twitter application associated with them.

Solution 4:

Just came across this today, hope it helps others.

If you are trying to authenticate Twitter API Authentication through Firebase.

It is mandatory that you should add the Callback URLs (required field) in the Authentication Section of your Twitter API Developer Portal.

Callback Url image reference for Twitter API Developer Portal

You can find the Callback Url from your Firebase Console in the Authentication Section (Sign-in methods) Authentication provider for Twitter.

Callback Url image reference from Firebase Developer Console

Make sure that the Callback Urls to be exactly the same.

If not, it will give you a error similar to this:

com.firebase.ui.auth.FirebaseUiException: There was an internal error in the web widget. [ {"code":"auth/invalid-credential","message":"Error getting request token: 403 <?xml version='1.0' encoding='UTF-8'?><errors><error code=\"415\">Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings</error></errors>.