Slack Plugin Invalid Token Passed
-
@Sebastian-Roth you can use our slack project to test.
-
@Wayne-Workman I don’t use slack much and can’t figure out how to get the OAuth token. Have looked though Slack docu and the website and have not found it. Maybe I am just too dumb…
-
@Sebastian-Roth Unfortunately, I can’t tell you when exactly the problem started. It isn’t a feature that I used much, but it was nice when I was running around to just get a message when an image deploy or capture was done. I will see about using push bullet instead maybe.
-
Is this still the case? I just barely started trying to get Slack integration working today.
-
@kafluke I guess so but I have not played with it lately.
-
Cross posting this as it was what I thought was a similar issue. Probably not the case here, but here it is anyhow.
https://forums.fogproject.org/topic/13486/fog-1-5-6-pushbullet-plugin-not-functioning
I could poke around with this plugin if need be. I don’t know much about slack but if it is free I’ll throw my hat in.
-
So here is where I’m at. I created a test Slack environment with the free version with a username of “@Paul Fry” and a channel called “#test-channel”. The FOG web gui seems to not be able to pull this info with the legacy token that slack generates. I tried the combinations of the token with my username by itself and the channel name by itself to no avail. I made sure to include the necessary character before each item. Both generate the following error:
This may be a red herring, but the slack api documentation is saying not to use the
channels.list
method that is used in the current plugin: https://api.slack.com/methods/channels.listThey say to use the newfangled conversations API that uses the method
conversations.list
instead. I am no coder so I can’t seem to figure out how to test this, but here is that API page: https://api.slack.com/methods/conversations.listThis doesn’t explain how it can’t pull a username from the site however. The
users.list
method is still supported. I believe the FOG plugin uses this, but somehow still can’t find my username.As an addendum to all of this, slack seems to be REALLY REALLY wanting to move away from what they call the “legacy token” (what we are using for the plugin) and instead wanting to use their apps platform. I do not know the viability of using this platform, but it looks pretty simple. The info can be found here: https://api.slack.com/custom-integrations/legacy-tokens
I may have time to poke around for a bit this weekend still, but my lack of coding fluency is really showing as I try to decipher what the heck slack wants us to do now.
Pinging @Sebastian-Roth just in case he is curious. You can find the OAuth token (legacy token) on this page when you are logged in (about half way down the page after all the dreck about how you shouldn’t be using it lol) : https://api.slack.com/custom-integrations/legacy-tokens
-
@fry_p said in Slack Plugin Invalid Token Passed:
Pinging @Sebastian-Roth just in case he is curious. You can find the OAuth token (legacy token) on this page when you are logged in (about half way down the page after all the dreck about how you shouldn’t be using it lol) : https://api.slack.com/custom-integrations/legacy-tokens
Thanks for that! It’s been a couple of weeks since I looked into this last (and the first time too) and I am fairly sure I had been on that page but there was no hint on that you had to be logged in to get a legacy token there. Maybe I was just blind that day, never mind.
-
@Sebastian-Roth Haha no problem! Please let me know if I can do anything. No rush on my part, but without the coding know-how, testing is all I can do! I actually impressed myself by understanding some simple logic in the different php files that make up these plugins. Oh, and some of the API methods. But that’s it lmao
-