I am wanting to open the full Salesforce rest library for things like a composite API to create tree structured data. Salesforce Developers as right now we can only do only a few supported things.
Is there an authentication flow that is recommended and a tutorial on how to set it up?
To access the full Salesforce REST API, including the Composite API for creating tree-structured data, you need to set up authentication using OAuth 2.0. Here's a recommended authentication flow and steps to set it up in Retool:
Create a Connected App in your Salesforce org:
Go to Setup > App Manager > New Connected App.
Provide a name and contact email for your Connected App.
Enable OAuth Settings and set the Callback URL to your Retool app URL.
Select the required OAuth scopes (e.g., "Access and manage your data (api)").
Save the Connected App.
Obtain the Consumer Key and Consumer Secret:
In Salesforce, go to your Connected App's settings.
Copy the Consumer Key and Consumer Secret.
Set up authentication in Retool:
Create a new resource in Retool and select "REST API" as the type.
Follow the step-by-step guide to create a Connected App in Salesforce and configure OAuth settings in Retool.
Use the provided code snippets and examples to authenticate and make API requests to Salesforce.
By following these steps and the Retool documentation, you should be able to successfully set up authentication and access the full Salesforce REST API in your Retool app.
Thank you for the info. I was able to get that to work as long as I don't have Share Credentials between users. Since I want to use this in a workflow I need a shared credential as it won't allow user based Oauth in a workflow. As soon as I do that it does the Login, but it doesn't get any tokens. Any idea how to fix that?
It sounds like you're on the right path. Could you please provide screenshots of the process you're following? When you said "As soon as I do that it does the Login, but it doesn't get any tokens", do you mean that the user is able to login but the workflow doesn't have access to the Auth Token?
Is share credentials between users is enabled on the resource configuration page? That could be your blocker here.