AdvancedLesson 29 of 37
REST/SOAP APIs and OAuth
Let other systems talk to Salesforce.
bash
# REST: query records
curl "https://MYDOMAIN.my.salesforce.com/services/data/v60.0/query?q=SELECT+Id,Name+FROM+Account+LIMIT+3" \
-H "Authorization: Bearer $ACCESS_TOKEN"APIs: REST, SOAP, Bulk API 2.0 (large data), Composite, GraphQL, Pub/Sub, Tooling and Metadata.
External apps authenticate with OAuth 2.0 through a Connected App (or External Client App): web-server (authorization code + PKCE), JWT bearer (server-to-server), client credentials, device flow. Never use username-password flow or share tokens in code.