I want to get user name from SF over REST API. Is it possible to do with only one step when I have access token. As I saw from documentation and samples I have first to call something like this

https://na15.salesforce.com/services/data/v20.0/sobjects/User/ headers : Authorization: Bearer access_token

then I get user URL, something like this :


and finally when I invoke that link over REST API I will get username. Is it possible to do this with one step when I have access token ? It is not natural for me to make two calls for such information.

Thanks, Rastko


1 Answer 1


assuming you know

  • Userid and OrgId
  • or you have the Id URL

you could call the OAuth identity service


have a look here http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

  • Yes, I know that I can get username directly if I have Userid and OrgId pair. I'm having to get UserId with access token when I get response form SF. I have described that in this case : link
    – Rastko
    Jun 5, 2013 at 14:03
  • Isn't the access token based on the password? Can't see a way to insert that in the URL
    – Saariko
    Jun 5, 2013 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.