{"id":43518739,"url":"https://github.com/ontanj/slack-payload","last_synced_at":"2026-02-03T14:09:03.978Z","repository":{"id":57031846,"uuid":"119841074","full_name":"ontanj/slack-payload","owner":"ontanj","description":"Helper to extract information when using Slack interactive messages","archived":false,"fork":false,"pushed_at":"2018-02-21T23:24:08.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-22T17:24:44.186Z","etag":null,"topics":["slack","slack-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ontanj.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-02-01T13:42:18.000Z","updated_at":"2020-03-11T13:43:48.000Z","dependencies_parsed_at":"2022-08-24T01:20:41.022Z","dependency_job_id":null,"html_url":"https://github.com/ontanj/slack-payload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ontanj/slack-payload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontanj%2Fslack-payload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontanj%2Fslack-payload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontanj%2Fslack-payload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontanj%2Fslack-payload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ontanj","download_url":"https://codeload.github.com/ontanj/slack-payload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontanj%2Fslack-payload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["slack","slack-api"],"created_at":"2026-02-03T14:09:03.424Z","updated_at":"2026-02-03T14:09:03.964Z","avatar_url":"https://github.com/ontanj.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payload\n\nWhen using interactive messages in Slack's API, the result is returned as a json encoded array through `$_POST[\"payload\"]`. This application helps extracting information from that payload.\n\n## Installation\n\n`composer require ontanj/slack-payload`\n\n## Usage \n\nThe Payload class is in the namespace `SlackPayload`.\n\nTo instantiate the Payload class, pass `$_POST[\"payload\"]` to the contructor.\nNow you can recieve the information by using functions of the object.\n\n### Available functions\n```\n/**\n * Gets callback id for the used attachment\n * @return string callback id\n */\npublic function callback_id() : string\n\n/**\n * Gets id for the channel the message came from\n * @return string channel id\n */\npublic function channel_id() : string\n\n/**\n * Gets name of the channel the message came from\n * @return string channel name\n */\npublic function channel_name() : string\n\n/**\n * Gets the choice made, either selected list item or pressed button.\n * @return string value of choice\n */\npublic function choice() : string\n\n/**\n * Gets the name of the menu where the list item was chosen.\n * If choice wasn't made from a list, the button value is returned.\n * @return string menu name\n */\npublic function menu_name() : string\n\n/**\n * Gets the URL to return a response to\n * @return string URL\n */\npublic function response_url() : string\n\n/**\n * Gets the id of the slack team where the message was sent from.\n * @return string team id\n */\npublic function team_id() : string\n\n/**\n * Gets the name of the slack team where the message was sent from.\n * @return string team name\n */\npublic function team_name() : string\n\n/**\n * Gets the id of the user performing the action\n * @return string user id\n */\npublic function user_id() : string\n\n/**\n * Gets the name of the user performing the action\n * @return string user name\n */\npublic function user_name() : string\n```\n\n## Future\n\nThe aim is to include more functions. Feel free to contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontanj%2Fslack-payload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontanj%2Fslack-payload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontanj%2Fslack-payload/lists"}