{"id":1742,"date":"2026-10-01T13:00:00","date_gmt":"2026-10-01T07:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/"},"modified":"2026-11-15T11:31:38","modified_gmt":"2026-11-15T06:01:38","slug":"salesforce-oauth-flows","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/","title":{"rendered":"Salesforce OAuth Flows: OAuth 2.0 Explained for Developers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Salesforce OAuth Flows are the approved ways for an app to get an access token, so it can call Salesforce APIs without handling a user&#8217;s password. Each flow fits a different kind of app: a website with a login button, a server job with no user, or a device without a keyboard. So picking the right flow is the most important security choice in any integration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn the main OAuth 2.0 flows, scopes, refresh tokens and how External Client Apps hold the settings. It builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-rest-api-postman\/\">the Salesforce REST API with Postman<\/a>, <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-external-client-apps\/\">External Client Apps<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-org-security-mfa-login\/\">org security with MFA<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Salesforce OAuth Flows?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">OAuth 2.0 is an open standard for letting an app act for a user, or for itself, with a token instead of a password. Salesforce OAuth Flows are the different OAuth 2.0 sequences Salesforce supports to issue those tokens. The app is registered in Salesforce, today usually as an External Client App, which stores its client ID, secret, scopes and policies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of a hotel key card. At the front desk, you prove who you are once, and you get a card that opens only your room until checkout. You never hand out the master key. The access token is that key card, and each OAuth flow is a different way to get it from the desk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Salesforce OAuth Flows Matter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, wrong flow choices cause most integration security problems. Here is why Salesforce OAuth Flows matter at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, the student portal needs users to log in with their own Salesforce account.<\/li>\n\n<li>Also, the nightly finance sync runs on a server with no user present.<\/li>\n\n<li>Next, the CI pipeline deploys code without anyone typing a password.<\/li>\n\n<li>However, the username-password flow is blocked by default in newer orgs and is being retired.<\/li>\n\n<li>Finally, security reviews check that tokens have the smallest scopes possible.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So knowing Salesforce OAuth Flows keeps integrations both working and safe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Salesforce OAuth Flows Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most Salesforce OAuth Flows share the same shape. First, an admin registers the app in Salesforce with a client ID, scopes and a callback URL or certificate. Next, the app proves its identity, through a user login, a client secret or a signed JWT. Then Salesforce checks the app policies and the user&#8217;s permissions. After that, it returns an access token and the instance URL, and sometimes a refresh token. Finally, the app sends the token in the Authorization: Bearer header on every API call.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-1-1024x640.png\" alt=\"Salesforce OAuth Flows diagram showing register, prove, check, token and call\" class=\"wp-image-1740\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-1-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The shared shape of every OAuth flow.<\/figcaption><\/figure>\n\n\n<h3 class=\"wp-block-heading\">Web Server Flow with PKCE<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The user logs in through a browser, and the app receives a short code, then swaps it for a token. PKCE adds a one-time secret, so a stolen code is useless.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Client Credentials Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A server sends its client ID and secret and gets a token for a fixed run-as user. So it suits system-to-system jobs with no human present.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JWT Bearer Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The app signs a JWT with its private key, and Salesforce checks it with the uploaded certificate. CI tools and the Salesforce CLI often use this flow.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Refresh Token Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A refresh token gets a new access token without asking the user to log in again. So store it as safely as a password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Device Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Devices with limited input show a code, and the user approves it on a phone or computer. For example, smart TVs and CLI tools use this.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Username-Password Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This old flow sends a username and password directly. Because it is risky, it is blocked by default in orgs created from Summer &#8217;23, and Salesforce is retiring it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OAuth Endpoints and Scopes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below lists the endpoints and common scopes you will use.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Item<\/th><th>Value<\/th><\/tr><\/thead><tbody><tr><td>Authorize endpoint<\/td><td>\/services\/oauth2\/authorize<\/td><\/tr><tr><td>Token endpoint<\/td><td>\/services\/oauth2\/token<\/td><\/tr><tr><td>Revoke endpoint<\/td><td>\/services\/oauth2\/revoke<\/td><\/tr><tr><td>Scope for API access<\/td><td>api<\/td><\/tr><tr><td>Scope for refresh tokens<\/td><td>refresh_token<\/td><\/tr><tr><td>Scope for identity<\/td><td>openid<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Client Credentials Flow vs JWT Bearer Flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below compares the two most used server-to-server flows.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>Client credentials<\/th><th>JWT bearer<\/th><\/tr><\/thead><tbody><tr><td>Proof of identity<\/td><td>Client secret<\/td><td>Signed JWT and certificate<\/td><\/tr><tr><td>Runs as<\/td><td>One run-as user in app policy<\/td><td>User named in the JWT<\/td><\/tr><tr><td>Secret stored<\/td><td>Client secret<\/td><td>Private key<\/td><\/tr><tr><td>Setup effort<\/td><td>Low<\/td><td>Medium<\/td><\/tr><tr><td>Best for<\/td><td>Simple system integrations<\/td><td>CI, CLI and many users<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When to use which depends on the caller. Use client credentials for one simple server integration. Use JWT bearer when you need certificate-based trust or several run-as users.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-2-1024x640.png\" alt=\"Salesforce OAuth Flows diagram comparing the client credentials and JWT bearer flows\" class=\"wp-image-1741\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-diagram-2-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Client credentials vs JWT bearer.<\/figcaption><\/figure>\n\n\n<h2 class=\"wp-block-heading\">A Real Salesforce OAuth Flows Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s use Salesforce OAuth Flows for the nightly finance sync at Bright Path Tutors. The finance server uses the client credentials flow with a dedicated integration user.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Configure the External Client App<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In Setup, open External Client App Manager and create Finance Sync.<\/li>\n\n<li>Enable OAuth and add the api scope.<\/li>\n\n<li>Turn on Enable Client Credentials Flow.<\/li>\n\n<li>In the app&#8217;s policies, set the run-as user to the Finance Integration user.<\/li>\n\n<li>Copy the consumer key and secret into the finance server&#8217;s secret store.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Request the Token<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>POST https:\/\/brightpath.my.salesforce.com\/services\/oauth2\/token\nContent-Type: application\/x-www-form-urlencoded\n\ngrant_type=client_credentials\n&amp;client_id=3MVG9...FinanceSyncKey\n&amp;client_secret=8E1F...FinanceSyncSecret<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The request goes to the My Domain URL, not login.salesforce.com, because client credentials needs it. Salesforce checks the key and secret, then issues a token for the run-as user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the response body.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"access_token\": \"00DKj000000abcd!AQ8AQ...\",\n  \"instance_url\": \"https:\/\/brightpath.my.salesforce.com\",\n  \"token_type\": \"Bearer\",\n  \"issued_at\": \"1789462800000\"\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">However, there is no refresh token in this flow. So the server simply asks for a new token when the old one expires.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Use the Token<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>GET https:\/\/brightpath.my.salesforce.com\/services\/data\/v67.0\/query?q=SELECT+Id,Amount__c+FROM+Payment__c+WHERE+Status__c='Paid'\nAuthorization: Bearer 00DKj000000abcd!AQ8AQ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Every API call carries the token in the header. As a result, the server never stores a Salesforce password.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Salesforce OAuth Flows and Security<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, give each integration its own app and its own integration user. Then grant only the scopes and permission sets it needs, and set short session timeouts. If a secret leaks, revoke tokens and rotate the secret in the app at once.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Salesforce OAuth Flows<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using the username-password flow for new integrations.<\/li>\n\n<li>Asking for the full scope when api is enough.<\/li>\n\n<li>Running integrations as a real person&#8217;s user.<\/li>\n\n<li>Storing client secrets or refresh tokens in code or Git.<\/li>\n\n<li>Sending client credentials requests to login.salesforce.com instead of My Domain.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Salesforce OAuth Flows<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use web server with PKCE for user logins.<\/li>\n\n<li>Use client credentials or JWT bearer for servers.<\/li>\n\n<li>Create one External Client App per integration.<\/li>\n\n<li>Grant the smallest scopes and a least-privilege integration user.<\/li>\n\n<li>Rotate secrets and certificates on a schedule.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Set up the JWT bearer flow for the Salesforce CLI in your Developer Edition org. Hint: create a certificate, upload it to an External Client App, and log in with sf org login jwt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Interview Questions on Salesforce OAuth Flows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">OAuth is one of the most asked integration topics. Here are the 22 questions asked most about Salesforce OAuth Flows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Questions on Salesforce OAuth Flows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What is OAuth 2.0?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a standard that lets apps get tokens, so they call APIs without sharing passwords.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: What is an access token?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a temporary credential, and the app sends it in the Authorization: Bearer header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: Where do you register an OAuth app in Salesforce?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In an External Client App, which replaces new connected apps since Spring &#8217;26.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: Which flow suits a website where users log in?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the web server flow with PKCE, because the user logs in through a browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: Which flow suits server-to-server calls?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use client credentials or JWT bearer, because no user is present.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: What is a refresh token?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a long-lived token, so it gets new access tokens without a new login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: What does the api scope allow?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It allows access to the user&#8217;s data through Salesforce APIs, so most integrations need it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code and Scenario Questions on Salesforce OAuth Flows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: Why is the username-password flow discouraged?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because the app handles real passwords, so it is blocked by default in newer orgs and being retired.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: What is PKCE?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a one-time code verifier, so it proves the token request comes from the app that started the login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: What does the JWT bearer flow need?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A certificate uploaded to the app and a JWT signed with the matching private key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: Who is the user in the client credentials flow?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is the run-as user set in the app&#8217;s policies, so pick a least-privilege integration user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: Does client credentials return a refresh token?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No, so the server requests a new access token when needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: How do you revoke a token?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">POST it to \/services\/oauth2\/revoke, or revoke it from the app&#8217;s OAuth usage page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: How does the Salesforce CLI log in without a browser in CI?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It uses the JWT bearer flow, so you run sf org login jwt with a key file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Questions on Salesforce OAuth Flows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: Why use a separate integration user?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So access is limited, audited and not tied to a person who may leave.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: What is the instance_url in the token response?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is the base URL for API calls, so the app sends every request there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: What is the device flow for?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It serves devices with limited input, so the user approves on another screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: How do you limit which users can use an app?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the app to admin-approved users and assign it through profiles or permission sets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: What is the difference between authentication and authorization here?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Authentication proves who you are, while authorization decides what the token can do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: How do Named Credentials relate to OAuth?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They let Salesforce run OAuth flows for outbound callouts and refresh tokens automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: What happens when an access token expires?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The API returns 401, so the app refreshes or requests a new token.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q22: How do you protect a leaked client secret?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rotate the secret, revoke existing tokens and review the login history.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?language=en_US&amp;id=remoteaccess_oauth_flows.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">OAuth Authorization Flows (Salesforce Help)<\/a><\/li>\n\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?language=en_US&amp;id=xcloud.remoteaccess_disable_username_password_flow.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">Block Authorization Flows to Improve Security (Salesforce Help)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Salesforce OAuth Flows issue tokens instead of sharing passwords.<\/li>\n\n<li>Use web server with PKCE for user logins.<\/li>\n\n<li>Use client credentials or JWT bearer for servers.<\/li>\n\n<li>External Client Apps store the client ID, scopes and policies.<\/li>\n\n<li>Avoid the username-password flow in all new work.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tokens let you call APIs, and most APIs speak JSON. Next, read our guide to <a href=\"https:\/\/swapnilzambare.com\/blog\/json-in-apex-serialize-deserialize\/\">JSON in Apex<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Salesforce OAuth Flows are the approved ways for an app to get an access token, so it can call Salesforce APIs without handling a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1739,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[246,8,96],"tags":[68,81,17],"swapz_series":[],"class_list":["post-1742","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-integration-apis","category-salesforce","category-salesforce-developer","tag-advanced","tag-integration","tag-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Salesforce OAuth Flows Explained for Developers<\/title>\n<meta name=\"description\" content=\"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&amp;A.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Salesforce OAuth Flows Explained for Developers\" \/>\n<meta property=\"og:description\" content=\"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&amp;A.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-01T07:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T06:01:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\"},\"headline\":\"Salesforce OAuth Flows: OAuth 2.0 Explained for Developers\",\"datePublished\":\"2026-10-01T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:01:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/\"},\"wordCount\":1736,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-oauth-flows-featured.png\",\"keywords\":[\"Advanced\",\"Integration\",\"Security\"],\"articleSection\":[\"Integration and APIs\",\"Salesforce\",\"Salesforce Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/\",\"name\":\"Salesforce OAuth Flows Explained for Developers\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-oauth-flows-featured.png\",\"datePublished\":\"2026-10-01T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:01:38+00:00\",\"description\":\"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&A.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-oauth-flows-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-oauth-flows-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Salesforce OAuth Flows featured image: title card with an integration code example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-oauth-flows\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Salesforce OAuth Flows: OAuth 2.0 Explained for Developers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Salesforce OAuth Flows Explained for Developers","description":"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&A.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/","og_locale":"en_US","og_type":"article","og_title":"Salesforce OAuth Flows Explained for Developers","og_description":"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&A.","og_url":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-10-01T07:30:00+00:00","article_modified_time":"2026-11-15T06:01:38+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a"},"headline":"Salesforce OAuth Flows: OAuth 2.0 Explained for Developers","datePublished":"2026-10-01T07:30:00+00:00","dateModified":"2026-11-15T06:01:38+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/"},"wordCount":1736,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png","keywords":["Advanced","Integration","Security"],"articleSection":["Integration and APIs","Salesforce","Salesforce Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/","url":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/","name":"Salesforce OAuth Flows Explained for Developers","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png","datePublished":"2026-10-01T07:30:00+00:00","dateModified":"2026-11-15T06:01:38+00:00","description":"Salesforce OAuth Flows explained simply: web server with PKCE, client credentials, JWT bearer, refresh tokens, scopes, security and 22 interview Q&A.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-oauth-flows-featured.png","width":2400,"height":1260,"caption":"Salesforce OAuth Flows featured image: title card with an integration code example"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-oauth-flows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Salesforce OAuth Flows: OAuth 2.0 Explained for Developers"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1742","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1742"}],"version-history":[{"count":1,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1742\/revisions"}],"predecessor-version":[{"id":2335,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1742\/revisions\/2335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1739"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1742"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}