Started by Jofar ArcharNov 9, 2021

Open
Use session_id from Salesforce to authenticate?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I'd like for you to make the API name from salesforce to python, after which upload some facts returned in salesforce asynchronously. Consequently, I need to log in as the authentic person in salesforce to technique my actions. As an example, an API name is made from SF to python, and then I'd like to create an account from python.

I exploit easy-salesforce in python.

I am passing the session_id from the user info.Getsessionid() from salesforce as a header in my API name to python, however then I am not able to use simple-salesforce to act because of the originating user.

How need to I accomplish that?

I have tried the following, however, I continually get invalid session_id mistakes.

from simple_salesforce import Salesforce    
Salesforce(instance_url="https://cs128.salesforce.com", session_id=session_id)
    Salesforce(instance_url="https://cs128.salesforce.com", session_id=session_id, domain='test')
    Salesforce(instance="test.salesforce.com", session_id=session_id, domain='test')
    Salesforce(instance="test.salesforce.com", session_id=session_id)

In my test, the user has a profile of system admin, with API enabled. Using my user with login/password I can successfully login to Salesforce so no problem on this site.

Just looking for a way to use the session_id from salesforce to keep on acting as the originating user.

0 Replies

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan