+ Start a Discussion
NBlasgenNBlasgen 

REST: Get Signed In User Information

I'm using Session ID + URL in connection with the RESTful API of Salesforce.  Is there any way to get the User ID of the user via the REST interface?

Please note, I'm not using oAuth so all the answers that say "when you autenticate via oAuth you get a Idenity Service URL" don't work for me since I don't get that URL.  Also, that URL includes the User ID so if I was able to generate it, then I'd already know the information I needed to kow.

Unless someone can explain otherwise, the Idenity URL is unavailable to me unless I can figure out the User ID:
https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_using_openid.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_using_openid.htm&language=en_US)
Best Answer chosen by NBlasgen
Thomas CookThomas Cook
You could hit /services/data/v32.0/chatter/users/me to get context user info. Pass the sid you have in the Authorization header, i.e.:

Authorization: Bearer <sid>

All Answers

Thomas CookThomas Cook
You could hit /services/data/v32.0/chatter/users/me to get context user info. Pass the sid you have in the Authorization header, i.e.:

Authorization: Bearer <sid>
This was selected as the best answer
NBlasgenNBlasgen
Thomas, brilliant.  I haven't tried it, but I already can see you're onto something.