-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channels:write is not an option under Oauth section anymore #12
Comments
I believe you are trying to use a bot token vs a user token. In the README, I make a mention of this:
Here's the API I'm using that needs It mentions scopes that are needed for bot vs user tokens. It looks like |
Thank you for getting back.
I saw the note, assuming it was a deprecation and was not aware at the time of user vs bot tokens. My mistake. Of course, I did get the error cause it could not write channel.
I moved the tokens to user, added Channels:write and re-released the app. It still seems to not be able to retrieve private (test1, test2) and public (test3) channels.
C:\Users\avroo\Documents\Slack Multi Add>slack-multi-channel-invite.exe -api_token=xoxb----------------------------------------------------------LFthfNrTF ***@***.******@***.***> -channels=test1,test2,test3 -private=true
Looking up users ...
Valid user (ID: U02D5H7LWLC) found for ***@***.***'
Inviting users to channels ...
Channel 'test1' not found -- skipping
Channel 'test2' not found -- skipping
Channel 'test3' not found -- skipping
All done! You're welcome =)
Debug shows its not getting Channels back.
Looking up users ...
Valid user (ID: U02D5H7LWLC) found for ***@***.***'
DEBUG: # of channels returned in page: 0
DEBUG: Total # of channels retrieved: 0
Channels in the right workspace:
***@***.***
OAuth Setup:
***@***.***
Any thoughts?
From: Jamie Tsao ***@***.***>
Sent: Thursday, August 4, 2022 1:01 AM
To: jamietsao/slack-multi-channel-invite ***@***.***>
Cc: Abri van Rooyen ***@***.***>; Author ***@***.***>
Subject: Re: [jamietsao/slack-multi-channel-invite] Channels:write is not an option under Oauth section anymore (Issue #12)
I believe you are trying to use a bot token vs a user token. In the README, I make a mention of this:
Add the following permission scopes to a user token (bot tokens aren't allowed channels:write):
Here's the API I'm using that needs channels.write: https://api.slack.com/methods/conversations.invite<https://url.emailprotection.link/?bcTMJGE9MwtOpNoBLHe4-O9Mjkvb5d1K2ne1yyA4kIEK7Ho3QrUqwQVJMUDZcjVl5f5s4nKe6NLVLKN2_Vj2IrhkT53kFLbc3x_ZPlLhU46srn79x5EgL6AEFn8yvkgV->
It mentions scopes that are needed for bot vs user tokens. It looks like channels:manage will work for bot tokens. To be honest, I don't know or remember the difference between the two. Did you get the script to work?
—
Reply to this email directly, view it on GitHub<https://url.emailprotection.link/?borsoM2pnFrca3ZgYW4LunKe0I06FODIv-4l9hYUAe5dwi6t-3_9wHrlirSoeLoLQPnHG8p8f-cd1IP0QfwKsdGTEhM-KAOCH9CV6W1ED3HVSiEMHWH2AWflBUnEAV7yrPoZj6KwGAT1a5qJKswGe6dEXaKcQtMxxjOYYmGKgdms~>, or unsubscribe<https://url.emailprotection.link/?bawJEKOr4ZVQxSJIqeRod58NhMqYbJ51BvobxuhoB6Sa-kvp-gX9PVqdkHKdF_q40mVsPUJkwJYzA3K_Ety3N0jCAcNBkej3KBXQfiVj_VhAMLa94f-xDuGiTDIVS5af4StYPj1OoLQnIT6zS4dtbKC1dbjht_tZKuIJLMIJFxRE~>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Hmm I'm not sure why no channels are being returned. This API is being used to retrieve channels: https://api.slack.com/methods/conversations.list and it requires the |
Yes, I did add that. I included a screenshot showing how all the scopes are setup.. maybe the screenshots were removed from the email reply.
I will try this a little later today.
Regards,
Abri van Rooyen | Chief Technology Officer (CTO)
Cobra Trading, Inc. | 3008 E. Hebron Pkwy | Building 400
Carrollton | TX | 75010 | 214-888-3044 | www.cobratrading.com<http://www.cobratrading.com/>
***@***.***
***@***.******@***.******@***.******@***.******@***.***<https://www.instagram.com/tradewithcobra/>
[encrypted]
From: Jamie Tsao ***@***.***>
Sent: Friday, August 5, 2022 1:51 AM
To: jamietsao/slack-multi-channel-invite ***@***.***>
Cc: Abri van Rooyen ***@***.***>; Author ***@***.***>
Subject: Re: [jamietsao/slack-multi-channel-invite] Channels:write is not an option under Oauth section anymore (Issue #12)
Hmm I'm not sure why no channels are being returned. This API is being used to retrieve channels: https://api.slack.com/methods/conversations.list<https://url.emailprotection.link/?bcTMJGE9MwtOpNoBLHe4-OwzQqJ2svZ8dHt5KX-D2vHFrltm7QxIJ-evkttkH-WHjCC6xu3n_4eLcuExrHfDkyBLTcPjXpul0zUdtzWXm7-pA5BeL_BJbgt1nNp1hOfoA> and it requires the channels.read permission, which I assume you've added to your user token?
—
Reply to this email directly, view it on GitHub<https://url.emailprotection.link/?bi3l3AvfDiGMyqaJhPlgtehcFmRg6RmA20M7McdYodyiB7b2J6_pP4U5cVhtQEBA0P8jt7FCmxnVI2CA6Nn5HlojT-94-a3uzB40cZKyDVeJpw8MMhbgNTz264f2I7QSV0iBq86yJUhIV6xguNowIvF6Ty2uqcNwT-UteyViN7Pg~>, or unsubscribe<https://url.emailprotection.link/?bSvkOUSymdr0O2kYTO-GeQJ36tzMctsg8RJAHGXJIVLenhtzftBXgEZ3ivDejdA-BAxqeqB3gNvznjK8zT8V21-YRA8-hrqgOa0rQAVz0eV48T_F9LJa22cvPvEomE7a7VLWFsuiYPjBEKtozhwlO8b8k0qGn6e-Rg3kUAXgGWMY~>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
✉ TLS encrypted by Smarsh Business Solutions
|
@avrooyen - Any luck getting this to work? Can I close this issue? |
Up to you on closing. I did not get around to test this due to moving to another urgent project att. If you want to keep it open, I will go back and attempt this next week and give feedback. |
@avrooyen - No problem, I'll leave it open. Let me know if you still have issues. |
Thank you for this scripts. Its going to make managing 100's of channels much easier. One issue I ran into is I could only find these three options for Channnels in scopes (OAuth and Permissions). I'm assuming they replaced the :write with :manage likely?
The text was updated successfully, but these errors were encountered: