Skip to main content
All CollectionsApideck Unify
Salesforce: How to get the instance URL for a Salesforce connection?
Salesforce: How to get the instance URL for a Salesforce connection?
Updated over 10 months ago

When using the Proxy API for making a Salesforce request, you will need the dedicated instance URL of a consumer.

Since each consumer will have its own instance URL, you can use the Unify variable injection.

An example for using the Proxy API to get all the custom objects from a Salesforce instance:

curl --location --request GET 'https://unify.apideck.com/proxy' \
--header 'x-apideck-consumer-id: YOUR_UNIFY_CONSUMER' \
--header 'x-apideck-app-id: YOUR_UNIFY_APP_ID' \
--header 'x-apideck-service-id: salesforce' \
--header 'x-apideck-downstream-url: {instance_url}/services/data/v57.0/sobjects/Contact/describe ' \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_UNIFY_API_KEY'

You can build up the Proxy API request with the consumer instance URL as part of the x-apideck-downstream-url header.

Example: {instance_url}/services/data/v57.0/sobjects/Contact/describe

Unify will inject the {instance_url} variable in the API endpoint URL based on the connection configured by the consumer.

Did this answer your question?