While one should consider the access token strings as opaque identifiers, at least as far as the present day is concerned, our access tokens have a format 1234-xyzxyzxyz -- the "1234" part before the dash is the user_id of the Twitter user the access token represents.
Calling account/verify_credentials without parameters using the access token will be a more canonical way to get the user_id. If it doesn't return data for you, either the user no longer has granted your app permission or there's something amiss with your OAuth signing. @episod <http://twitter.com/intent/user?screen_name=episod> - Taylor Singletary On Wed, Jun 29, 2011 at 3:34 PM, Evgeny <yaid...@gmail.com> wrote: > Hi! > > On my site users have ability to interact with Twitter. For this I > stored only access token & secret, not user_id. But now I want to know > user_id in Twitter for this users. How can I get it right way? > > I tried request users/show without params, signed with users's token - > received "error":"Not found"; tried statuses/user_timeline without > params just to get user_id from post data, it works, but there are > some users with zero posts. > > Thanks! > > -- > Twitter developer documentation and resources: https://dev.twitter.com/doc > API updates via Twitter: https://twitter.com/twitterapi > Issues/Enhancements Tracker: > https://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > https://groups.google.com/forum/#!forum/twitter-development-talk > -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk