Skip to content

feat: add apps.icon.set method - #2058

Merged
mwbrooks merged 1 commit into
mainfrom
zimeg-feat-apps-icon-set
Nov 18, 2026
Merged

mwbrooks merged 1 commit into
mainfrom
zimeg-feat-apps-icon-set

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds the apps.icon.set method to the Web API clients.

  • apps_icon_set takes a required app_id and either a file to upload or the url of a publicly hosted image. A file is sent as multipart/form-data, the way users_setPhoto sends its image.
  • The async and legacy clients are regenerated with scripts/codegen.py, and the method is added to the Web API coverage test.

This is the only pull request in the apps.icon stack, so it's based on main. It's in the B7 app settings batch. Related to #2014.

  1. feat: add apps.icon.set method #2058 apps.icon.set 👈 this pull request

Testing

With a user token that has the app_configurations:write scope, for an app you collaborate on that's installed with a bot user:

  1. Call client.apps_icon_set(app_id=..., file="icon.png") with a square PNG and confirm bots.info for the app's bot returns new icons URLs, then check the icon on the app settings page.
  2. Call client.apps_icon_set(app_id=..., url=...) with a publicly hosted image and confirm the icons change again.
  3. Repeat with AsyncWebClient to check the generated async method.

Live check: on a scratch app installed in a developer workspace with a bot user, file with a 1024px PNG and then url with a 512px PNG hosted on GitHub each returned ok. Each call changed the bot's bots.info icons.image_72 to the new image within 5 seconds, from the old icon to the uploaded file to the hosted image. The bot user's avatar_hash in users.info changed too, but trailed by a call for a few minutes. A 460px image returns invalid_icon_size, and a URL that isn't an image returns error_bad_format.

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I have signed the Salesforce CLA (required before your PR can be reviewed or merged).
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.63%. Comparing base (1b59fea) to head (dc169c0).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
slack_sdk/web/async_client.py 80.00% 1 Missing ⚠️
slack_sdk/web/client.py 80.00% 1 Missing ⚠️
slack_sdk/web/legacy_client.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2058      +/-   ##
==========================================
+ Coverage   84.60%   84.63%   +0.02%     
==========================================
  Files         118      118              
  Lines       14046    14061      +15     
==========================================
+ Hits        11884    11900      +16     
+ Misses       2162     2161       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zimeg
zimeg marked this pull request as ready for review November 18, 2026 17:54
@zimeg
zimeg requested a review from a team as a code owner November 18, 2026 17:54

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @zimeg! The live check on both file and url makes this an easy one to approve.

Comment thread slack_sdk/web/client.py Resolved
@mwbrooks
mwbrooks merged commit e1811b7 into main Nov 18, 2026
19 checks passed
@mwbrooks
mwbrooks deleted the zimeg-feat-apps-icon-set branch November 18, 2026 17:58
@zimeg

zimeg commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

🌟 Thanks for the kind review @mwbrooks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants