2

I'm trying to display the profile picture on another website (photo url is something like https://c.na87.content.force.com/profilephoto/1234W000000ABCD/F. I have a sid token returned by oauth.

There's that url hack that lets you pass session id as a query string parameter and also pass a retURL path that might be a photo url, like:

https://[instance].salesforce.com/secur/frontdoor.jsp?sid=[SESSION_ID]?retURL=https://c.na87.content.force.com/profilephoto/1234W000000ABCD/F

Which seems to work, but only if the users don't use lightning and only as a browser redirect - so it doesn't work in img src.

SFDC session system creates separate sid for each domain, thus *.content.force.com - in which profile photo lives - has its own sid. Using this session id as below seems to do the trick, but I have no idea how to obtain that session id (headless browser login or copy and paste the cookie doesn't count)

https://c.na87.content.force.com/profilephoto/1234W000000ABCD/F?sid=[SESSION_ID_FOR_.content.force.com_DOMAIN]

Any ideas?

Your Answer

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

Browse other questions tagged or ask your own question.