Access Salesforce GET requests to retrieve customer details, and metadata with Python.
Link to source code:
https://github.com/edgecate/Salesforc...
Accessing SFDC APIs is going to be pretty similar to the Supercoach web scraping video, in that we’re again, trying to create an OAuth2 access token which will give us permission to access Salesforce API GET requests.
If we tried to access those GET requests without a token, we’d basically receive an authorisation error.
In order to generate that token, we need to get our Client Id, Client Secret, and Authorisation URL, which can be done by creating a Connected App in Salesforce. Once you’re logged in, go to:
Setup, Apps, App Manager, New Connected App
Give your connected app a name, and contact email
Tick Enable OAuth Settings
Provide a callback URL which can be anything – even Localhost
Select the OAuth scope you’d like to access – for now, select everything
Click Save and Continue
Note down the:
Consumer Key which is the Client ID,
Consumer Secret which is our Client Secret, and
Callback URL.
Then click:
Manage
Edit Policies
Ensure that Permitted Users is set to All users may self-authorize
And IP Relaxation is set to Relax IP restrictions.
Depending on your organisation, you may have to leave it as Enforce IP restrictions, butthen whitelist the IP addresses under Network Access.
Click Save, and the hard part is done!
Replace the input variables with your own details
On this page of the site you can watch the video online How To Access Salesforce APIs using Python (SFDC Tutorial) with a duration of hours minute second in good quality, which was uploaded by the user Edgecate 20 May 2019, share the link with friends and acquaintances, this video has already been watched 12,800 times on youtube and it was liked by 192 viewers. Enjoy your viewing!