ashishkranjan / dabr

Automatically exported from code.google.com/p/dabr
0 stars 0 forks source link

"Login credentials incorrect" 401 OAuth error #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What are the steps to trigger the problem?
1)click the 'sign in with twitter' image on the homepage
2)return the 401 Login credentials incorrect.

i find that the oauth address is incorrect with the twitter gave to me
in the function user_oauth() in the user.php

you define

$response = twitter_process('http://api.twitter.com/oauth/access_token', 
$params);

$response = twitter_process('http://api.twitter.com/oauth/request_token', 
$params);

$authorise_url = 'http://api.twitter.com/oauth/authorize?
oauth_token='.$token['oauth_token'];

but the Twitter Application gave me the address like

Request token URL
http://twitter.com/oauth/request_token

Access token URL
http://twitter.com/oauth/access_token

Authorize URL
http://twitter.com/oauth/authorize 

i changed them in the user.php but still not working

pls help, thx alot

Original issue reported on code.google.com by angelsk...@gmail.com on 21 May 2010 at 4:39

GoogleCodeExporter commented 9 years ago
you can check this out at my website http://api.angelsky11.com

Original comment by angelsk...@gmail.com on 21 May 2010 at 4:40

GoogleCodeExporter commented 9 years ago
Am getting same error.

Original comment by ilovetoa...@gmail.com on 24 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Have you set the OAUTH keys in config.php?

Original comment by david.carrington on 25 Aug 2010 at 6:57

GoogleCodeExporter commented 9 years ago
I have my OAuth keys entered in config.php, but I simply get:

"Error: Login credentials incorrect."

Original comment by ro...@macleary.com on 25 Aug 2010 at 9:28

GoogleCodeExporter commented 9 years ago
Apologies, I think my error is actually the same as #134, not this one.

Original comment by ro...@macleary.com on 25 Aug 2010 at 9:29

GoogleCodeExporter commented 9 years ago
Issue 134 has been merged into this issue.

Original comment by david.carrington on 25 Aug 2010 at 1:48

GoogleCodeExporter commented 9 years ago
i had a problem with this once, turns out the keys in config.php had a trailing 
space in it. 

Original comment by ldoug...@gmail.com on 25 Aug 2010 at 2:10

GoogleCodeExporter commented 9 years ago
I've checked and no spaces etc in the key or secret.

Tried again with a clean download of r335, did nothing but add the consumer 
key, consumer secret to (appropriately renamed) config.php and a random 
encryption key.

Same result:

   Error: Login credentials incorrect.

   401: 

Nothing in my Apache error logs for that site.

Original comment by ro...@macleary.com on 25 Aug 2010 at 2:49

GoogleCodeExporter commented 9 years ago
Another thought - could this have something to do with callback?  What's the 
recommended callback URL for an instance of Dabr running OAuth.  Should it just 
be 'http://domain.tld' or should it point to a specific PHP file?

Original comment by ro...@macleary.com on 25 Aug 2010 at 3:17

GoogleCodeExporter commented 9 years ago
The callback URL chosen for your app in Twitter settings makes no difference. 
The code overrides this when it's needed.

Original comment by david.carrington on 25 Aug 2010 at 3:58

GoogleCodeExporter commented 9 years ago
Now this is odd, I've just managed to fix this.

When the 'Browser' option was mentioned above I went into my app settings on 
dev.twitter.com and checked.  Now for some reason every time I went in it would 
revert to Client, even if I selected Browser and then saved, which I just 
thought was the default option being restored as the page displayed.  I didn't 
have any callback URL set, but no errors came up when I saved the settings.

This morning I updated to r337 and tried again.  Still getting the same 401 and 
error.  I went back into dev.twitter.com, checked my app settings (once more 
had gone back to Client), but this time I changed it to Browser _and_ filled in 
callback as http://domain.tld, and saved.

Works perfectly!

Original comment by ro...@macleary.com on 27 Aug 2010 at 8:36

GoogleCodeExporter commented 9 years ago
Can anyone else confirm if this fix resolves it for them too? If so, I'll add 
it to the setup guide.

Original comment by david.carrington on 27 Aug 2010 at 10:16

GoogleCodeExporter commented 9 years ago
As I am behind a firewall, I visit twitter.com via proxy. But I didn't visit 
dabr via proxy. When I try to visit dabr via proxy, it's done.

Original comment by Ava...@gmail.com on 31 Aug 2010 at 1:56

GoogleCodeExporter commented 9 years ago
i've trying to reset my consumer key and secret but still no result.

Original comment by i4nb...@gmail.com on 1 Sep 2010 at 10:15

GoogleCodeExporter commented 9 years ago
i just got this today. tried from 2 different browsers - same thing. then tried 
a different login and it worked. then tried the first login and it worked. not 
sure what the problem is, but I suspect MY problem at least was a Twitter 
problem. fyi

Original comment by ldoug...@gmail.com on 1 Sep 2010 at 7:43

GoogleCodeExporter commented 9 years ago
I have the same problem. Oauth is blocked in China, I have to skip the wall and 
try to use dabr + itap to login twitter account. But it always shows that 
Error: Login credentials incorrect.

401:

I don't know what's up.

Original comment by cico%hi-...@gtempaccount.com on 4 Sep 2010 at 1:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The solution in Comment 11 worked for me.

Original comment by goldd...@gmail.com on 27 Sep 2010 at 3:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
1. go to http://twitter.com/oauth_clients/
2. select your app is client 

3. in the url type http://site.where.dabr.is.hosted.tld/oauth/ - the last slash 
has to exist

4. it has to work.

(tested on latest version stoled from the repository)

Original comment by necenzu...@gmail.com on 9 Oct 2010 at 4:19

GoogleCodeExporter commented 9 years ago
I met the same question,does anybody fix it?

Original comment by nonoc...@gmail.com on 27 Oct 2010 at 6:46

GoogleCodeExporter commented 9 years ago
I have the same problem,tried Comment 11 but still get "Login credentials 
incorrect" 401 OAuth error

Original comment by YuRan.Or...@gmail.com on 21 Jan 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Hey, 

   If you still receive this error, go your application settings in:
http://twitter.com/oauth_clients/

and edit your application to " Browser " then put your website address on the 
callback URL eg. ( http://domain.tld )

 :)

Cheers!

Original comment by clickban...@gmail.com on 6 Feb 2011 at 2:47

GoogleCodeExporter commented 9 years ago
There are too many ways to cause this 401.
After tried Comment 11 and Comment 21(and they didn't work), I found out that 
if your server's time is not accurate, then you may also see this annoying 401.
I contact server's provider and fix time settings, then NO MORE 401.

Original comment by leibao0...@gmail.com on 13 Apr 2011 at 5:57

GoogleCodeExporter commented 9 years ago
Looks like this is now solved.

Original comment by terence.eden on 13 Jun 2011 at 4:35

GoogleCodeExporter commented 9 years ago
not yet..
this problem didn't fixed

i have a problem with this message error
please help me :(

Original comment by green.id...@gmail.com on 1 Dec 2011 at 1:20

GoogleCodeExporter commented 9 years ago
hahaha just change the acces type to Read and Write from Read
fixed

Original comment by rizkitan...@gmail.com on 12 Feb 2012 at 12:30

GoogleCodeExporter commented 9 years ago
what the best solution ?

Original comment by landryti...@gmail.com on 3 Mar 2012 at 2:36

GoogleCodeExporter commented 9 years ago
hi ! i try to create new twitter account for my new apps. and it's work !
you shoul try it.

Original comment by herupram...@gmail.com on 23 Mar 2012 at 7:24

GoogleCodeExporter commented 9 years ago
Go to Your Apps Setting Dev.twitter.com

Click on Tab "Setting"
make sure that you choose Read, Write and Access direct messages on Application 
type.

Its Work

http://twit.godigid.com/

Original comment by ik...@darulmujahadah.com on 7 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago
I've read all the comments above, and I have tried all. It all does not work. 
anyone can help me? This message is always there :

Original comment by coy.wa...@gmail.com on 9 Aug 2012 at 5:28

Attachments:

GoogleCodeExporter commented 9 years ago
In Twitter API Developers:
1. Go to Settings Tab and FULLFILL all the empty box (especially Callback URL, 
Organization website, and Website)
2. Select "Read, write, and direct messages" in Application Type - dont forget 
to save/update your settings and make sure its updated!
3. Go to Details > press button under Your access token, make sure its Access 
level become: "Read, write, and direct messages"

in config.php
4. AFAIK Twitter made https as default so use https instead of http 
(https://api.twitter.com/1/)
5. Insert your encryption key
6. Insert your consumer key and consumer secret

Hope this works...

Original comment by lukas.ho...@gmail.com on 1 Dec 2012 at 6:36