yannickglt / alfred-slack

The Slack workflow for Alfred app
GNU General Public License v2.0
330 stars 31 forks source link

Error thrown when following setup instructions 'Missing client secret. Please check the generated unique code.' #57

Closed billyromano closed 4 years ago

billyromano commented 4 years ago

When visiting https://yannickglt.github.io/alfred-slack/ to get the unique code to authenticate the Alfred Slack workflow, it returns this error saying the unique ID generated is missing the client secret.

I think the issue may be due to how the PHP is parsing the JSON data.

I'm not able to setup and use this for any Slack team that I use, please take a look into this issue. Thanks!

yannickglt commented 4 years ago

The doc says to append your client secret (got from your Alfred Worklow app configuration in Slack) to the unique ID generated at https://yannickglt.github.io/alfred-slack/. Your final command should be something like slack --add-client <unique_id>:<client_secred>

billyromano commented 4 years ago

Yes, I did that. I posted this error, because I followed the steps and came across this issue.

I turned on debug mode and I'm putting the info here for you to see. I've replace my PII with X's.

10:49:59.520] Slack[Script Filter] Passing output '{"controller":"config","action":"saveClient","params":{"clientCredentials":"XXXX.XXXX|XXXX.XXXX.XXXX"}}' to Run Script [10:49:59.726] STDERR: Slack[Run Script] Cache folder: /Users/XXXX/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.yannickglt.alfred2.slack Data folder: /Users/XXXX/Library/Application Support/Alfred/Workflow Data/com.yannickglt.alfred2.slack ACTION: AlfredSlack\Controllers\ConfigController::saveClientAction() SIMULATE: php -r '$query="{\"controller\":\"config\",\"action\":\"saveClient\",\"params\":{\"clientCredentials\":\"XXXX.XXXX|XXXX.XXXX.XXXX\"}}";include "scripts/index.php";'; [10:49:59.743] Slack[Run Script] Processing complete [10:49:59.744] Slack[Run Script] Passing output 'Missing client secret. Please check the generated unique code.' to Post Notification

billyromano commented 4 years ago

I figured it out. I didn't include the client secret as part of the instructions. This was the part I didn't follow: UNIQUE_CODE:CLIENT_SECRET

It works now ☺️