Loading

Salesforce SOAP API Login Endpoint URLs for Production, Sandbox, and My Domain Orgs

Fecha de publicación: May 30, 2026
Descripción

This article explains which endpoint URL values to use when logging in to a Salesforce org via the SOAP API (web service API). It covers production, sandbox, and My Domain login endpoints, and explains the best practice for avoiding hard-coded endpoint URLs in your integration code.

Solución

Best Practice: Use the login() Method

Salesforce does not recommend hard-coding the endpoint URL value into your integration code. The best practice is to execute the login() SOAP API call using one of the generic login endpoints. This call returns a LoginResult object. The LoginResult object contains a metadataServerUrl string that holds the correct endpoint URL for your org. Use this value to reset the SOAP endpoint to the returned server URL for all subsequent API calls.

Production Login Endpoint

For production org instances, use the following endpoint URL:
https://login.salesforce.com/services/Soap/c/xx.0/0DF300000000xxS
Replace "xx.0" with the API version you are using and replace "0DF300000000xxS" with your org's client identifier.

Sandbox Login Endpoint

For sandbox org instances, use the following endpoint URL:
Replace "xx.0" with the API version you are using.

My Domain Login Endpoint

If My Domain is enabled on the org, you can also use the My Domain URL as the login endpoint:
https://[MyDomain].my.salesforce.com/services/Soap/c/xx.0/0DF300000000xxS
Replace [MyDomain] with the My Domain name of your company (for example, if your My Domain is "acme", the URL becomes ).

Número del artículo de conocimiento

000385590

 
Cargando
Salesforce Help | Article