-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,57 @@ | ||
# slackforce | ||
|
||
A Slack and Salesforce integration project written in Golang. | ||
|
||
## How to get Slack Token and Cookie | ||
|
||
TOKEN | ||
+++++ | ||
|
||
#. Open your browser's *Developer Console*. | ||
|
||
#. In Firefox, under `Tools -> Browser Tools -> Web Developer tools` in the menu bar | ||
#. In Chrome, click the 'three dots' button to the right of the URL Bar, then select | ||
'More Tools -> Developer Tools' | ||
#. Switch to the console tab. | ||
#. Paste the following snippet and press ENTER to execute:: | ||
|
||
JSON.parse(localStorage.localConfig_v2).teams[document.location.pathname.match(/^\/client\/(T[A-Z0-9]+)/)[1]].token | ||
|
||
#. Token value is printed right after the executed command (it starts with | ||
"``xoxc-``"), save it somewhere for now. | ||
|
||
COOKIE | ||
++++++ | ||
|
||
**Getting the cookie value** | ||
|
||
#. Switch to Application_ tab and select **Cookies** in the left | ||
navigation pane. | ||
#. Find the cookie with the name "``d``". That's right, just the | ||
letter "d". | ||
#. Double-click the Value of this cookie. | ||
#. Press Ctrl+C or Cmd+C to copy it's value to clipboard. | ||
#. Save it for later. | ||
|
||
Setting up the application | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
#. Create the file named ``.env``. | ||
#. Add the token and cookie values to it. End result | ||
should look like this:: | ||
SLACK_TOKEN=xoxc-<...elided...> | ||
SLACK_COOKIE=xoxd-<...elided...> | ||
Alternatively, if you saved the cookies to the file, it will look like this:: | ||
SLACK_TOKEN=xoxc-<...elided...> | ||
SLACK_COOKIE=path/to/slack.com_cookies.txt | ||
#. Save the file and close the editor. | ||
## Usage | ||
``` | ||
make start | ||
``` |