Problems authenticating with xAuth


#1

Hello,

I’m trying to get an access token using xAuth (my application has already been approved for xAuth), but I keep getting 401 Not Authorized response from server. I have some questions about the oauth/access_token request using xAuth:

What should be my request url ? I tried https://api.twitter.com/oauth/access_token and https://api.twitter.com/oauth/access_token?x_auth_username=xxxxxxxx&x_auth_password=xxxxxxxxxxxx&x_auth_mode=client_auth. None of these requests worked. For the first request, the server asked for the request token and secret, which I don’t use in the xAuth authentication. The second request also returned a 401 Not Authorized response, and a message saying that the oauth signature could not be validated. However, I tried the values in the documentation (https://dev.twitter.com/docs/oauth/xauth) and I could generate the same signature, so the algorithm seems to be right.

Second question, what should be the POST body ? I tried the one in the documentation page ( something like “x_auth_username=xxxxxxx&x_auth_password=xxxxxxxxx&x_auth_mode=client_auth” ) , but it didn’t work either.

Third question, about the POST header. Should it include the x_auth_username, x_auth_password, and x_auth_mode parameters ? I tried all the combination of the above, but with no success.

Also, the error messages change depending on the combination of url + header + body. Sometimes I don’t even receive an error message at all, sometimes I receive a “could not validate oauth signature”.

Can someone help me ? I’m running out of ideas on how to make this work.

Thanks


#2

Hi :=] You need get this authenticating in menu (MY APPLICATIONS). Change the authenticating for Access level (Read and write).


#3

I already had the permission level set to Read, Write, and DM, but I changed to RW anyways, but it still doesn’t work.


#4

You need to also re-negotiate your access token to have R&W access. App settings reflect how “new” tokens will be negotiated but have no effect on already existing tokens


#5

Hey can u verify my account thanks i know who follows are messing my account. I like protect who i follow and other follows they messed up twitter and other account. Thanks