function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ariel RosenthalAriel Rosenthal 

Generate access token to access REST API inside SalesForce (APEX)

Hi all,

I need to find a way to login to a site with Salesforce credentials but starting the communication in Salesforce. That means, do the OAuth thing inside salesforce and use the access token from the response and send it to an external application which would use the token to do SF operations on the customer behalf. Is this possible?

Thanks.
Manj_SFDCManj_SFDC
Did you try using connected App, that may help you
mukesh guptamukesh gupta
Hi,

please use below url:-

https://community.boomi.com/docs/DOC-2551

Kindly mark my solution as the best answer if it helps you.


Thanks
Mukesh 
Ariel RosenthalAriel Rosenthal
Hey @manj_SFDC @mukesh_gupta I have tried that. I'm already using a connected app. But I need a way to generate the access token from salesforce itself, not an external application, and then send it to an external application to authenticate the user and do SF related operations on their behalf. Does it make sense?

Thanks.
Jordan VasquezJordan Vasquez
Hey @Ariel Rosenthal,

Have you ever figured out a solution for this? I am in need of a similar solution.

Thanks!