# Enable API Access in Salesforce

API access needs to be enabled in Salesforce for the user connecting Stacksync to its Salesforce instance.

Follow the steps below to:

* Enable API access in Salesforce by Profile
* Enable API access in Salesforce by Permission Set

{% tabs %}
{% tab title="Enable API access by Profile" %}
**Enable API access in Salesforce by Profile**

\
1\. Click the Gear icon and click **Setup.**

<figure><img src="/files/ALAWPWyXcEilvYwraYEw" alt=""><figcaption></figcaption></figure>

\
2\. Type **profiles** into the Quick Find box and select **Profiles.**\
\
3\. Click **Edit** against the Profile you wish to enable API access for.&#x20;

<figure><img src="/files/oRuhAfMVjZKNh6K2sOkx" alt=""><figcaption></figcaption></figure>

4\. Scroll down to **Administrative Permissions** and check the **API Enabled** box and click **Save**.<br>

<figure><img src="/files/1mUyezr6BISLH0D88fmQ" alt=""><figcaption></figcaption></figure>

The API in Salesforce is now enabled for the modified profile. All users with this profile now have API enabled permissions.&#x20;

***

***Optional:*** If your sync includes the ContentDocumentLink object (used for Salesforce Files / attachments), also enable the Query All Files permission in the same permission set. This only works for custom profiles, salesforce standard profiles do not allow you to turn enable this permission.\
\
5\. In your custom profile scroll down to *Administrative Permissions* section and enable *Query all data*&#x20;

<figure><img src="/files/8Q1unW5cqA4vPPXGBxsZ" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Enable API access by Permission Set" %}

#### Enable API Access in Salesforce by Permission Set

&#x20;\
1\. Click the Gear icon and click **Setup.**

<figure><img src="/files/cQkiPGdps0rzUiv2ndrt" alt=""><figcaption></figcaption></figure>

\
2\. Type **permission** into the Quick Find box and select **Permission Sets.**

3\. Select the Permission Set you wish to enable API access for. (Or click "NEW" if you want to create a new one).

<figure><img src="/files/czonicj0NEMm1tgopxmS" alt=""><figcaption></figcaption></figure>

4\. Scroll down to **System** and click **System Permissions.**

<figure><img src="/files/BDXQQH84vqQ028AiFw3e" alt=""><figcaption></figcaption></figure>

5\. Click **Edit**

<figure><img src="/files/nqHahjhLenhlvTmDTHXs" alt=""><figcaption></figcaption></figure>

6\. Check the **API Enabled** box and then scroll up and click **Save.**

<figure><img src="/files/cryVhogh4eaGnGemeMng" alt=""><figcaption></figcaption></figure>

The permission set now has the API Enabled permission. The permission set should be applied to the user connecting Salesforce to Stacksync.

7. Select the permission set and click **Manage Assignments** and then **Add Assignments**.
8. Select the check boxes next the names of the users you want assigned to the permission set, and click **Assign**.

***

*Optional:* If your sync includes the ContentDocumentLink object (used for Salesforce Files / attachments), also enable the Query All Files permission in the same permission set.

8\. Switch the permission set overview to *App Permissions*

<figure><img src="/files/xkQEFSF4a0xH3zgXbWVc" alt=""><figcaption></figcaption></figure>

9. Click **Edit**

<figure><img src="/files/GyLx2XuJBlMo50POfepd" alt=""><figcaption></figcaption></figure>

10. Scroll down to the *Content* section and enable *Query All FIles* and then scroll up and click **Save.**

<figure><img src="/files/Ur0v0V4WH1QMXg33g36Y" alt=""><figcaption></figcaption></figure>

<br>
{% endtab %}
{% endtabs %}

Learn more in [this Salesforce documentation](https://help.salesforce.com/s/articleView?id=sf.branded_apps_commun_api_permset.htm\&type=5).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stacksync.com/two-way-sync/connectors/salesforce/authorize-salesforce/enable-api-access-in-salesforce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
