Set up authentication and credentials
The Server-to-Server connector is a backend-to-backend integration: your service authenticates itself (there’s no human logging in) using a connected app — a Salesforce-side record that issues OAuth 2.0 credentials your backend uses to call Data Cloud.
Create the connected app
- From Setup, open App Manager and create a New Connected App.
- Give it a name and enable OAuth Settings.
- Add the Data Cloud scopes your integration needs, then save.
Choose an OAuth flow
A Server-to-Server integration typically uses one of two OAuth 2.0 flows — pick based on how you can store secrets:
- Client credentials flow — simplest; your backend sends a consumer key and consumer secret to get a token.
- JWT bearer flow — your backend signs a request with a private key instead of sending a secret over the wire; use this if you can manage a certificate.
Generate credentials
- For the client credentials flow, open the connected app and copy its consumer key and consumer secret.
- For the JWT bearer flow, generate a digital certificate, upload it to the connected app, and keep the matching private key on your backend.
- Store whichever credential you use in a secret manager or environment variables — never in source control.
Test a token request
- Call your org’s OAuth token endpoint with the connected app’s credentials and the flow’s grant type.
- Confirm the response returns an
access_tokenand aninstance_url. - Send that token as a
Bearerheader on your first Data Cloud API call.
Discussion
Comments are not configured for local development. They appear once the site owner connects GitHub Discussions (Giscus).