Activity Forums Salesforce® Discussions How to get session ID in Salesforce?

  • Marziya

    Member
    October 28, 2020 at 1:56 pm
    1. Use POST method.
    2. Set the end point. Sandbox - https://test.salesforce.com/services/Soap/u/35.0. ...
    3. Set your headers as below. SOAPAction = "" ...
    4. Use the below as body. ...
    5. Get the SessionId.
    • This reply was modified 3 years, 10 months ago by  Forcetalks.
    • This reply was modified 3 years, 10 months ago by  Forcetalks.
  • Shweta

    Member
    October 29, 2020 at 11:35 am

    We can find a salesforce session-id by going to the contact page inside of Salesforce and looking at the URL at the top of the page. Everything to the right of “salesforce.com/” is your ID number. It will be 15 digits.
    In Apex you can find session id by using this: String MySessionID = UserInfo.getSessionID();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos