403 Forbidden error message when using verify_credentials



What I want to achieve is retrieve the current logged in user’s screen name.
After authorising the app to access user info I make an api call to ‘http://api.twitter.com/1/account/verify_credentials.json

First of all is this the right thing to do or should I be using something else?

Secondly, this works fine if I am not logged in to twitter in another window.
If I am logged in to twitter (which automatically happens when I authorise the app) I get a response:
403 Forbidden: The server understood the request, but is refusing to fulfill it.

Any help would be appreciated.



Make sure that you’re using OAuth exclusively when making these requests – cookies might be getting in the way of you accomplishing this correctly, and you should make sure you’re not consuming nor sending them.

You also should receive the user’s screen name as one of the parameters provided to you in the response to oauth/access_token


Thanks Taylor.
Ill give that a go.




Hi Randeep,

Were you able to solve the issue? I am having the same problem. I am not able to authenticate a user if he has already been logged into twitter in another window. Please help.