Get Salesforce Tokens via Username-Password Flow (No Browser)
sf_get_token_password_flowObtains Salesforce OAuth2 tokens using username-password flow without browser redirect. Requires Connected App setup with offline_access scope and username-password flow enabled.
Instructions
Obtains Salesforce OAuth2 tokens using the username+password grant — no browser, no auth-code redirect required.
Requirements on the Connected App (one-time Salesforce Setup):
Scope: "Perform requests at any time (refresh_token, offline_access)"
Setup → Identity → OAuth and OpenID Connect Settings → "Allow OAuth Username-Password Flows" = ON
Append security token to password if required: myPasswordABC123
Returns refresh_token and a ready_for_quickstart block for sf_quickstart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sf_client_id | Yes | Salesforce Connected App Consumer Key (Client ID) | |
| sf_client_secret | Yes | Salesforce Connected App Consumer Secret (Client Secret) | |
| username | Yes | Salesforce username (email), e.g. me@myorg.com | |
| password | Yes | Salesforce password. If your org uses a security token, append it directly: password+securitytoken | |
| sf_base_url | Yes | Salesforce org instance URL, e.g. https://myorg.my.salesforce.com (sandbox auto-detected from hostname) |