# Integrating with Salesforce

**URL:** <https://forum.bubble.io/t/integrating-with-salesforce/318939>\
**Category:** APIs\
**Created:** [April 22, 2024, 10:09pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939 "2024-04-22T22:09:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:09pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/1 "2024-04-22T22:09:41Z")

</div>

Hey Fellow Bubblers,  
Salesforce is that one app that I can’t wrap around and don’t really understand fully.

**Context:** I’m trying to integrate my app with Salesforce. It’s a multi-tenant app with multiple organizations. Some organizations have the ability to integrate my app with their Salesforce instance.

I want to integrate by having whoever from the org is setting up the integration to login with Salesforce to grant access for me to write and read from/to their Salesforce instance.

**Here’s my thought process:** I’m thinking I might need to use [OAuth 2.0 Web Server Flow](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&language=en_US&type=5)? But can’t really figure it out. How do I get a Connected App? From my understanding, a connected app needs to be configured per Salesforce instance.

**Any tips on where to start?**

Thanks!

–

Also important to note I’m doing something different than [this past thread](https://forum.bubble.io/t/using-salesforce-s-api/201792) I opened working with only one specific Salesforce instance with the username + password of the Salesforce account.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:13pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/2 "2024-04-22T22:13:51Z")

</div>

Will you use API Connector or do manual configuration?  
user-agent flow is probably easier to implement

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:14pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/3 "2024-04-22T22:14:57Z")

</div>

API Connector

I don’t understand where you get the client\_id from, is it from a connected app I create in my developer’s salesforce instance?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:17pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/4 "2024-04-22T22:17:01Z")

</div>

Yes. client ID and client secret should be provided with the app you have created in SF dev console.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:19pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/5 "2024-04-22T22:19:04Z")

</div>

I’m looking [here](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_user_agent_flow.htm&type=5) and it seems to only ask for client id?

I’m assuming it’s this?

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/2/72737f6e03a46a0431c399499d7ea86be7172595.png)

I’m then getting this error:

 ![Screenshot 2024-04-22 at 15.19.39](https://us1.discourse-cdn.com/bubble/original/3X/d/3/d3c9e250a70c24cd93805b786f4aa1f181640ece.png)

 ![Screenshot 2024-04-22 at 15.18.56](https://us1.discourse-cdn.com/bubble/original/3X/d/1/d1d2480c2305f79030d72e172929745e011b711c.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:20pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/6 "2024-04-22T22:20:44Z")

</div>

Doing this, is a manual process. The authorize url is a GET request and is made using a simple link (link element or Open an external url.  
The token request will be made in API Connector

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:24pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/7 "2024-04-22T22:24:32Z")

</div>

Oh I think I know what you mean. The problem is that I still can’t generate the correct link:

 ![Screenshot 2024-04-22 at 15.23.30](https://us1.discourse-cdn.com/bubble/original/3X/2/8/28c8ec8199743c470068881203e9dad075cc57cd.png)

I’m doing:

[https://login.salesforce.com/services/oauth2/authorize?response\_type=token&client\_id=3MVG91oqviqJKoEFFsEHiHzzE1.\_RAyZ2N\_08OBv9p99fCLqHDEbpk4sqTKs2VFLjBjQ7jiOg2\_XX1fzjuIVe&redirect\_uri=](https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=3MVG91oqviqJKoEFFsEHiHzzE1._RAyZ2N_08OBv9p99fCLqHDEbpk4sqTKs2VFLjBjQ7jiOg2_XX1fzjuIVe&redirect_uri=)[Redirect URL]

I think my client id is wrong? Is the above screenshot not where I get it from?

But I’m pretty sure that’s right:

 ![Screenshot 2024-04-22 at 15.28.12](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2baf76ac8b8e671a1a27ebacfdc4243fc3beefef.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:28pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/8 "2024-04-22T22:28:33Z")

</div>

Your url is response type token. I was thinking you was looking for webserver flow? I checked the doc and finally, it will work too . More standard authorization\_code process 😉

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:30pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/9 "2024-04-22T22:30:26Z")

</div>

Oooh I was looking at User-Agent Flow because I thought you said it’s easier to implement 😅

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:31pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/10 "2024-04-22T22:31:44Z")

</div>

haha yes sorry!

```auto
https://MyDomainName.my.salesforce.com/services/oauth2/authorize?
client_id=3MVG9IHf89I1t8hrvswazsWedXWY0i1qK20PSFaInvUgLFB6vrcb9bbWFTSIHpO8G2jxBLJA6uZGyPFC5Aejq&
redirect_uri=https://www.mycustomerorderstatus.com/oauth2/callback&
response_type=code

```

replace your client\_id with the one from dev and the correct url

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:32pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/11 "2024-04-22T22:32:57Z")

</div>

lol no worries I tried doing

`https://login.salesforce.com/services/oauth2/authorize? client_id=3MVG9IHf89I1t8hrvswazsWedXWY0i1qK20PSFaInvUgLFB6vrcb9bbWFTSIHpO8G2jxBLJA6uZGyPFC5Aejq& redirect_uri=https://www.mycustomerorderstatus.com/oauth2/callback& response_type=code` and it’s not working

I’m assuming I can’t just do [login.salesforce.com](http://login.salesforce.com) and have to collect the org’s salesforce domain?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:34pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/12 "2024-04-22T22:34:04Z")

</div>

Login salesforce will work for all instance.  
You will collect this info from the token endpoint (that you will initialize in API Connector). This will be used in future call. But for auth, it’s not needed

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:44pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/13 "2024-04-22T22:44:09Z")

</div>

Hmm now I’m getting: `.../error=invalid_request&error_description=missing+required+code+challenge` at my redirected URL any ideas? It doesn’t even bring me to the sign into SF screen 😅

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:46pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/14 "2024-04-22T22:46:00Z")

</div>

Do you have the full url? Sound strange because what doc say is that pkce is not mandatory

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:51pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/15 "2024-04-22T22:51:07Z")

</div>

Yep: `https://login.salesforce.com/services/oauth2/authorize?client_id=3MVG91oqviqJKoEFFsEHiHzzE1_DB44PnACp3bZwIrPI9CIIfIJje6mo1HSMfgXxYG0LFt08BIbIdwyGCMLL.&redirect_uri=https://volunteerfusion.bubbleapps.io/version-test/salesforce_callback&response_type=code`

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:52pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/16 "2024-04-22T22:52:33Z")

</div>

Oh I know… lol

I had `Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows` enabled

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:52pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/17 "2024-04-22T22:52:40Z")

</div>

Issue is probably in your settings in Connected app. I don’t have access to a SF account actually, but you need to turn off something for PKCE

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 22, 2024, 10:58pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/18 "2024-04-22T22:58:29Z")

</div>

Omg _ **FINALLY** _ thank you so much @Jici was banging my head over this one for a couple of hours lol

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [April 22, 2024, 10:59pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/19 "2024-04-22T22:59:27Z")

</div>

Next step is to get the token in API connector using the code 😉 Forget everything related to pkce (provide minimal information for the token endpoint)

---

<div class="post-metadata">

**Author:** ![leoncico895](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@leoncico895](https://forum.bubble.io/u/leoncico895)\
**Post date:** [September 22, 2025, 5:24pm UTC](https://forum.bubble.io/t/integrating-with-salesforce/318939/20 "2025-09-22T17:24:17Z")

</div>

Does each company have to install my external app? Or is it enough to just create the external app in my Salesforce dev account so I can integrate with them? I ask this because when I login to other organization I get this error /oauth/callback?error=OAUTH\_EC\_APP\_NOT\_FOUND&error\_description=External+client+app+is+not+installed+in+this+org
