• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Slack Plugin Invalid Token Passed

    Scheduled Pinned Locked Moved
    General Problems
    5
    12
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dooleyrd
      last edited by

      I just noticed that some time after the last upgrade, I stopped receiving messages from FOG to Slack. I am using FOG 1.5.5 and I have removed the snap -in and readded it. I have also reinstalled the app on the Slack Plugin and copied the OAuth Access Token from Slack, but continue to get the message of Invalid Token Passed. Any thoughts?

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @dooleyrd I have not used the plugin myself but trying to read up on things I see that Slack has changed the API token authentication a fair bit over time. Not sure if it’s just that our plugin doesn’t work anymore at all.

        @Tom-Elliott @Wayne-Workman From this topic I see that it used to work with Slack API Tester App and generated test tokens. But here I read that those are legacy…

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        D 1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          @Sebastian-Roth you can use our slack project to test.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @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… 😄

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • D
              dooleyrd @Sebastian Roth
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • K
                kafluke
                last edited by

                Is this still the case? I just barely started trying to get Slack integration working today.

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @kafluke I guess so but I have not played with it lately.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • fry_pF
                    fry_p Moderator
                    last edited by

                    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.

                    Like open source community computing? Why not do it for a good cause?
                    Use your computer/server for humanitarian projects when it is idle!
                    https://join.worldcommunitygrid.org?recruiterId=1026912

                    fry_pF 1 Reply Last reply Reply Quote 0
                    • fry_pF
                      fry_p Moderator @fry_p
                      last edited by fry_p

                      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:

                      fog1.PNG

                      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.list

                      They 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.list

                      This 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

                      Like open source community computing? Why not do it for a good cause?
                      Use your computer/server for humanitarian projects when it is idle!
                      https://join.worldcommunitygrid.org?recruiterId=1026912

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @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.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        fry_pF 1 Reply Last reply Reply Quote 1
                        • fry_pF
                          fry_p Moderator @Sebastian Roth
                          last edited by

                          @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

                          Like open source community computing? Why not do it for a good cause?
                          Use your computer/server for humanitarian projects when it is idle!
                          https://join.worldcommunitygrid.org?recruiterId=1026912

                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by

                            @fry_p @dooleyrd @kafluke I still hat no time to look into this. It’s just too many topics und not enough people to do the stuff. Any chance one of you guys or your co-workers can help with this?

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            211

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project