Skip to content

Instantly share code, notes, and snippets.

  • Star 26 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Approach: Automating Salesforce Data Extraction Using Python
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chitemerere
Copy link

Thank you very much, quite eye opening. Now with multi-factor authentication (MFA), the code fails to authenticate into Salesforce. What changes are required in the code to take care of MFA.

@rapatil
Copy link
Author

rapatil commented Dec 19, 2022

Thank you very much, quite eye opening. Now with multi-factor authentication (MFA), the code fails to authenticate into Salesforce. What changes are required in the code to take care of MFA.

Please work with your Salesforce Admin for permission settings and MFA. The code works on my end.

@jessepink
Copy link

using your code pretty much verbatim for downloading a salesforce report I am getting a error thrown in requests: requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

Do you know if something has changed in the past couple months that would be causing so many redirects? If I copy sfUrl into a browser (that is also logged in) it does generate and download the report as expected...

@rapatil
Copy link
Author

rapatil commented Mar 31, 2023

The script is running successfully on our end. Please cross-check the salesforce instance name/url with your Salesforce Admin.

@syedfaizalex
Copy link

Thank you so much for your code to get report from salesforce, How can i apply filter on report to get only specific data.

@gillieo
Copy link

gillieo commented Jul 28, 2023

using your code pretty much verbatim for downloading a salesforce report I am getting a error thrown in requests: requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

Do you know if something has changed in the past couple months that would be causing so many redirects? If I copy sfUrl into a browser (that is also logged in) it does generate and download the report as expected...

I am also experiencing this redirect issue. Any one come up with a solution?

Copying sfUrl and pasting into browser works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment