# Slack oauth2 in bubble

**URL:** <https://forum.bubble.io/t/slack-oauth2-in-bubble/326219>\
**Category:** Need help\
**Created:** [June 10, 2024, 8:05pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219 "2024-06-10T20:05:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 10, 2024, 8:05pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/1 "2024-06-10T20:05:06Z")

</div>

I try to connect slack oauth2 using the following:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/e/9ef9eb714db5c67c4462b9f4e3d7ec3d5f36c333.png)

however, it tells me “error: not\_authed”. I only have bot tokens permissions and the token I enter after bearer is the “Bot User OAuth Token”.

do you have any idea what I might be doing wrong?

thanks

---

<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:** [June 10, 2024, 8:21pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/2 "2024-06-10T20:21:16Z")

</div>

Here’s my setting 😉  
You need to have the correct scopes set in Slack (and you can have more than the 3 I have that is really just for user auth)

 ![screenshot-bubble.io-2024.06.10-16_19_55](https://us1.discourse-cdn.com/bubble/original/3X/b/2/b2387073dad4ad61b88761314fc244a7a53e0043.png)

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 1:32pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/3 "2024-06-11T13:32:13Z")

</div>

@Jici I try this and I keep getting this error:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/7/57a0f65e6b44e31326a70ba33163dcdc95634d36.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/8/78b81e49d419178485c988ff31ad3a451a496424.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/3/63e772894cccfcb26d605ee5c8b9c28e4e8aed2b.png)

not sure what to do. can you think of a reason why this happens? I googled but not much to be found.

---

<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:** [June 11, 2024, 2:03pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/4 "2024-06-11T14:03:43Z")

</div>

Remove the access token in header key. Look at my screenshot.

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 2:18pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/5 "2024-06-11T14:18:33Z")

</div>

@Jici Removed it and still the same result.

---

<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:** [June 11, 2024, 2:26pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/6 "2024-06-11T14:26:27Z")

</div>

You are mixing Bot scopes and user scopes  
you first need to request user scope and after, you will be able to make another request for both scope (but using a manual process for this one and storing the bot auth in DB). Sadly, Slack doesn’t allow to request bot and user scope at the same time and also doesn’t return the open ID data if you request bot scope only (there’s a way to request both scopes, but the issue will remain as you cannot get the profile endpoint if you request both at the same time)

I was thinking you only need to authenticate user at first.

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 3:51pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/7 "2024-06-11T15:51:16Z")

</div>

@Jici Still happening even after I added user token scopes

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/c/5c9924a79d51e7019671f0f4568cd78d9c5a504e.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/5/f5f2ba3a06dad8bad39ebb74f9380429aa5f2676.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:** [June 11, 2024, 3:54pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/8 "2024-06-11T15:54:49Z")

</div>

Which url redirect did you set in slack? Is it a different error now?

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 3:58pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/9 "2024-06-11T15:58:39Z")

</div>

@Jici The error is still the same. I set many url redirects including the one in the bubble app. I also created an oauth\_redirect page just in case, but it does not work either.

---

<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:** [June 11, 2024, 4:01pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/10 "2024-06-11T16:01:08Z")

</div>

No issue on my side. Not sure what is wrong with your settings. Do you get to the authorize page or the error come before that?

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 4:04pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/11 "2024-06-11T16:04:00Z")

</div>

@Jici No, I dont get to the authorize page. I am redirected immediately to “theres been a hitch”. Yeah, pretty weird.

---

<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:** [June 11, 2024, 4:06pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/12 "2024-06-11T16:06:16Z")

</div>

Delete dev key/secret, make sure you are using the correct client ID and client secret in “live” fields (this will be applied to dev too). Can you share the url after that (where you get the error)

---

<div class="post-metadata">

**Author:** ![sensei01](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sensei01](https://forum.bubble.io/u/sensei01)\
**Post date:** [June 11, 2024, 4:14pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/13 "2024-06-11T16:14:41Z")

</div>

@Jici You are right, I had entered the App id in the “app id” field; I now entered the “client id” and it worked. the naming tricked me. thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [August 19, 2024, 8:05pm UTC](https://forum.bubble.io/t/slack-oauth2-in-bubble/326219/14 "2024-08-19T20:05:48Z")

</div>

Closed on August 19, 2024, 8:05pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
