{"id":15717840,"url":"https://github.com/celso/shirk","last_synced_at":"2026-04-28T08:34:18.109Z","repository":{"id":57153572,"uuid":"131500693","full_name":"celso/shirk","owner":"celso","description":"An unofficial but eventually useful tokenless Slack library with minimal dependencies","archived":false,"fork":false,"pushed_at":"2019-07-05T10:27:27.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-19T06:20:22.724Z","etag":null,"topics":["bot","slack","slack-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-29T14:20:14.000Z","updated_at":"2021-03-30T15:57:17.000Z","dependencies_parsed_at":"2022-08-28T12:50:53.734Z","dependency_job_id":null,"html_url":"https://github.com/celso/shirk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/celso/shirk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celso%2Fshirk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celso%2Fshirk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celso%2Fshirk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celso%2Fshirk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celso","download_url":"https://codeload.github.com/celso/shirk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celso%2Fshirk/sbom","scorecard":{"id":270660,"data":{"date":"2025-08-11","repo":{"name":"github.com/celso/shirk","commit":"506449f4839a36a4e1d69f043c4b906da59b5ea4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T13:15:47.908Z","repository_id":57153572,"created_at":"2025-08-17T13:15:47.908Z","updated_at":"2025-08-17T13:15:47.908Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32373505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","slack","slack-library"],"created_at":"2024-10-03T21:51:28.257Z","updated_at":"2026-04-28T08:34:18.087Z","avatar_url":"https://github.com/celso.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shirk\n\nAn unofficial but eventually useful tokenless Slack library with minimal dependencies.\n\nShirk authenticates agaisn't normal user credentials (email and password) and doesn't require any bot token to operate. It creates a valid session by emulating the browser behaviour just like the official Slack web client.\n\nThis is useful when you don't have access to a token to connect your bot and use the official Slack API.\n\nPlease note that:\n\n * Some scrapping is involved, as well as undocumented private APIs, so this may break at any moment.\n * 2FA is not yet supported\n\n## How to install\n\n```\nnpm install --save shirk\n```\n\n## How to test\n\n```\nnpm run test -- teamname email@domain.com PaSsw0rd\n```\n\nYou can find the example test [code here][1].\n\n## How to use\n\nHere's an example:\n\n```javascript\nvar shirk = require('shirk');\n\nconst channels=['general', 'random'];\n\nshirk.getSession({\n    team: 'teamname',\n    email: 'email@domain.com',\n    password: 'PaSsw0rd',\n    onError: function(err) {\n        console.log(err);\n    },\n    onSession: function(session) {\n\n        // your stuff here\n\n        console.log(\"We have a session: \");\n        console.log(session.info());\n        console.log(\"Listening to channels \"+channels.join(','));\n\n        session.listenChannels({\n            channels: channels,\n            onMessage: function(message) {\n                console.log(message);\n            },\n            onMessageThread: function(message) {\n                console.log(message);\n            },\n            onReaction: function(reaction) {\n                console.log(reaction);\n            },\n            onReady: function() {\n                console.log(\"We're listening\");\n            }\n        });\n\n    }\n});\n```\n\n## Methods\n\n**getSession(args)**\n\nStarts a Slack session.\n\nargs:\n\n * team - team name (without slack.com)\n * email - acccount\n * password - password\n * onError(err) - callback function to return errors\n * onSession(session) - callback function to return a good session\n * debug - boolean, true if you want console debug\n\n**session.info()**\n\nReturn the session information: token, session_uid.\n\n**session.listenChannels(args)**\n\nListens for messages in a list of channels. Fires up events when a new message arrives.\n\nargs:\n\n * channels - array of channels to listen to\n * onError(err) - callback function to return errors\n * onMessage(message) - callback function when a new message arrives\n * onMessageThread(message) - callback function when a new reaction to a message arrives\n * onReaction(reaction) - callback function when a new reaction to a message arrives\n\nexample of message:\n\n```javascript\n{ type: 'message',\n  user: 'U3AE4L4F5',\n  text: 'Has anyone else had trouble claiming this?',\n  client_msg_id: 'A8D34254-B724-42C7-8A32-B2D17DE6A3A2',\n  ts: '1515209040.000173',\n  channel: 'A0S7VK72A',\n  channelname: 'general',\n  username: 'shirk' }\n```\n\n_real usernames and channelnames are added to the message structure, along with the ids, for convenience, both from normal users or bots_\n\n## Using Slack's Web API methods\n\nYou can use any normal [Slack API method][2] after getting a valid session with getSession(). Here's an example:\n\n```javascript\nvar shirk = require('shirk');\n\nshirk.getSession({\n    team: 'teamname',\n    email: 'email@domain.com',\n    password: 'PaSsw0rd',\n    onError: function(err) {\n        console.log(err);\n    },\n    onSession: function(session) {\n\n        session.callMethod('emoji.list', {\n            onError: function(error) {\n                console.log(error);\n            },\n            onSuccess: function(r) {\n                console.log(r);\n            }\n        });\n\n    }\n});\n```\n\n## Data structures\n\nYou can access these data structures once a session is open:\n\n**session.channels**\n\nList of channels. Example:\n\n```javascript\n[ { id: 'A4ZA28E3M',\n    name: 'general',\n    is_archived: false,\n    is_general: false,\n    is_muted: false,\n    is_member: true,\n    name_normalized: 'general',\n    unread_count: 0,\n    unread_count_display: 0,\n    is_pending_ext_shared: false },\n    ...\n    {\n        ...\n    }\n]\n```\n\n**session.users**\n\nList of users in the team. Example:\n\n```javascript\n[\n  { id: 'U3AEKELAH',\n    team_id: 'T1A7TIA62',\n    name: 'mike',\n    deleted: false,\n    color: '5870dd',\n    real_name: 'Mike Foo',\n    tz: 'Europe/London',\n    tz_label: 'British Summer Time',\n    tz_offset: 3600,\n    profile:\n     { title: '',\n       phone: '',\n       skype: '',\n       real_name: 'Mike Foo',\n       real_name_normalized: 'Make Foo',\n       display_name: 'mike',\n       display_name_normalized: 'mike',\n       status_text: '',\n       status_emoji: '',\n       status_expiration: 0,\n       avatar_hash: '232938482734',\n       image_original: 'https://a.com/98237424_original.png',\n       email: 'mail@mike.com',\n       team: 'T1A7TIA62',\n       is_custom_image: true },\n    is_admin: false,\n    is_owner: false,\n    is_primary_owner: false,\n    is_restricted: false,\n    is_ultra_restricted: false,\n    is_bot: false,\n    updated: 1512234520,\n    is_app_user: false,\n    has_2fa: false },\n    ...\n    {\n        ...\n    }\n]\n```\n\n## Changelog\n\nYou can check the [changelog here][3].\n\n## Disclaimer\n\nI've made this library for my own use. Use it at your own risk. I assume no responsibility or liability for any errors or omissions with this software. The information contained here is provided on an “as is” basis with no guarantees of completeness, accuracy, usefulness or timeliness and without any warranties of any kind whatsoever, express or implied.\n\n[1]: https://github.com/celso/shirk/blob/master/test.js\n[2]: https://api.slack.com/methods\n[3]: CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelso%2Fshirk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelso%2Fshirk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelso%2Fshirk/lists"}