simple_salesforce.login module

Login classes and functions for Simple-Salesforce

Heavily Modified from RestForce 1.0.0

simple_salesforce.login.SalesforceLogin(username=None, password=None, security_token=None, organizationId=None, sandbox=False, sf_version='38.0', proxies=None, session=None, client_id=None)

Return a tuple of (session_id, sf_instance) where session_id is the session ID to use for authentication to Salesforce and sf_instance is the domain of the instance of Salesforce to use for the session.


  • username – the Salesforce username to use for authentication
  • password – the password for the username
  • security_token – the security token for the username
  • organizationId – the ID of your organization
    NOTE: security_token an organizationId are mutually exclusive
  • sandbox – True if you want to login to, False if
    you want to login to
  • sf_version – the version of the Salesforce API to use, for example
  • proxies – the optional map of scheme to proxy server
  • session – Custom requests session, created in calling code. This
    enables the use of requets Session features not otherwise exposed by simple_salesforce.
  • client_id – the ID of this client