Comments (14)
Facing the same issue when using docker and from my local. My config is set correctly,
{
"slack_token": "mytoken"
}
➜ slack-term -config ~/.config/slack-term/config
2022/06/22 08:28:25 not able to authorize client, check your connection and if your slack-token is set correctly
Anyone still facing this problem?
from slack-term.
Yes, I did some digging around in the code, and it turns out @bagnaram in #136 is correct.
The library that slack-term uses to interface with the official API is slack-go, but that (as far as I can tell) does not support this particular authentication method (xoxc
token + xoxd
token in Cookie
header).
After cloning this repo, and cloning slack-go, and then forcing slack-term to use my local version of slack-go, and then modifying slack-go to shove my own personal xoxd
token into the Cookie
parameter in the headers of the API request, I was able to get slack-term connected.
slack-go will need a change to allow passing in and setting that particular header parameter in API requests.
slack-term will need a change to add a config option for the xoxd
token that the user must also fetch somehow (easiest from the dev tools in the browser, I find). And it will need to pass that to slack-go when it creates a new API connection.
So, in summary, it's a two-headed problem. This app doesn't supply the xoxd
token, and even if it did, the library it uses doesn't have the facilities to handle that. I'm going to try and work on an MR to submit here, and one to submit to slack-go.
I'm not sure why this doesn't seem to be a bigger issue for more people. Some comments in various threads on this problem mention that it's only newer workspaces. That seems like the most likely explanation.
from slack-term.
I experience the same issue but can get it to work if I specify the config location with the -config
flag: slack-term -config ~/.slack-term
or slack-term -config ~/.config/slack-term/config
.
from slack-term.
I was able to bodge together a working proof of concept together by copying the chttp implementation from slackdump, which was referenced in the last comment of the above linked issue 1092
If it ends up meeting my needs, I'll try to put together a more proper implementation that takes the cookie as a config value rather than hardcoding it, though I don't really know Go so we'll see.
from slack-term.
^ ceandreasen's fork works.
Instructions on how to get xoxd token on this other project's readme: https://github.com/NoF0rte/slack-slurp
from slack-term.
Same issue, the Docker container works and can connect to my Slack account, but the binary does not. My config file is located at the following per the README:
~/.config/slack-term/config\
from slack-term.
Update: I apparently had comments in my config file (JSON doesn't support comments and neither does the app).
I got this to work:
sudo docker run -it -v ~/.config/slack-term/config/.slack-term:/config erroneousboat/slack-term
But this still does not work:
slack-term -config ~/.config/slack-term/config/.slack-term
I will happily use the Docker container though.
from slack-term.
I wanted to test slack-term and I get this error too.
First attempt with method 4 (window.promt() trick, very clever :) ), then method 2 https://github.com/erroneousboat/slack-term/wiki#method-2 . I got two different tokens, and neither of them worked :(
$ docker run -sh -v /home/[username]/.config/slack-term/config:/config erroneousboat/slack-term
2022/04/27 08:45:26 not able to authorize client, check your connection and if your slack-token is set correctly
$ ./slack-term-linux-amd64
2022/04/27 10:46:44 not able to authorize client, check your connection and if your slack-token is set correctly
from slack-term.
(I also ran docker run -sh -v /home/[username]/.config/slack-term/config:/config --entrypoint /bin/sh erroneousboat/slack-term
to check that the config file was mounted correctly in /config with the token, and that I could ping servers on the 'net from inside the container - just in case. All seemed fine.)
from slack-term.
First, the default config file is in ./config/slack-term/config
(its a file, not a directory).
When installing it via snap
, that config file is stored in:
~/snap/slack-term/current/.config/slack-term/config
(you can confirm as it is created automatically).
You need to edit that file and add your token there. You can also add other config options as specified.
When updating slack-term
that file is very likely to be removed, so keep a copy somewhere.
from slack-term.
I'm affected by the same issue.
from slack-term.
Thank you @Seanld . Would love to see a fix for this issue.
In slack-go they are working on something at slack-go/slack#1092
from slack-term.
I have this problem too.
from slack-term.
@thomas-scrace sorry for the slow reply. I have a working version here in my fork. It's still messy but you can now specify the additional token from the config value slack_xoxd_token and it's been working for me all summer.
I had to do some funny stuff with dependencies to make it work that I don't really recall the details of any more, probably not all up to snuff at all, but if someone who knows how Go works wants to clean it up be my guest.
from slack-term.
Related Issues (20)
- Program crashes with error: unsupported block type HOT 4
- Any way to paste binary image to slack-term
- Add another keyboard command for "help", to avoid F1 being captured by terminal emulator HOT 1
- Add GitHub Actions support
- go get throws "not enough arguments in call to stack.ParseDump" error HOT 5
- Document Data collection/Data Usage Policy
- Is this import intentional ? HOT 3
- Disable borders? HOT 1
- slack-term go installation issue... HOT 1
- Token Method 2 does not work HOT 1
- Syntax error when start slack-term
- show only one channel
- config file is cleared when using '-config' HOT 1
- Program Crashes With Error: Cannot unmarshal object into Go struct field HOT 2
- Is it possible to install on 32 bit systems? HOT 2
- Update Readme for newer Go versions
- (Feature request) Displaying pinned messages in a channel
- Paths to github.com/erroneousboat/slack-term in repository HOT 1
- Bug report: 404 for https://erroneousboat.github.io/slack-term-auth/?code= when creating token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-term.