Skip to content

feat(methods): add apps.icon.set method example - #430

Open
zimeg wants to merge 2 commits into
mainfrom
zimeg-feat-apps-icon-examples-set
Open

zimeg wants to merge 2 commits into
mainfrom
zimeg-feat-apps-icon-examples-set

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds a method example for apps.icon.set in methods/src/apps/icon/apps-icon-set.js, and lists it in methods/README.md.

  • The example sets the icon from a url. The other way, file, takes the image contents as a Buffer.
  • The docs page has no example values for app_id or url, so the example uses A0123456789 and https://example.com/icon.png.
  • The manifest requests no scopes: app_configurations:write comes with an app configuration token or a manager app's token, and app manifests reject it (illegal_user_scopes).

This is the only pull request in the apps.icon examples stack (batch B7 app settings), and it's based on main. Example stacks are grouped by family, so #431 adds the apps.managed.permissions.set example from the same batch in its own stack.

  1. feat(methods): add apps.icon.set method example #430 apps.icon.set 👈 this pull request

Dependency

This depends on slackapi/node-slack-sdk#2866, which adds apps.icon.set to @slack/web-api. It shipped in @slack/web-api@8.5.0, which methods/package.json now pins.

Testing

  1. cd methods/src/apps/icon && slack install --environment local, then export SLACK_TOKEN=... with an app configuration token, which carries app_configurations:write.
  2. slack run apps-icon-set.js and confirm the response. Replace A0123456789 with an app you own and the URL with a public image between 512x512px and 2000x2000px to see ok.
  3. Confirm the new icon on the app: bots.info for its bot returns new icons URLs right away, and the bot user's profile image follows within a few minutes.

With a local build of slackapi/node-slack-sdk#2866, the same client.apps.icon.set call on a real app returned ok, changed the bot's icons immediately and changed the bot user's avatar about two minutes later.

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg marked this pull request as ready for review November 20, 2026 10:10
@zimeg
zimeg requested a review from a team as a code owner November 20, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant