Skip to content

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

Draft
zimeg wants to merge 3 commits into
mainfrom
zimeg-feat-apps-icon-set
Draft

zimeg wants to merge 3 commits 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 sync and async clients.

  • appsIconSet takes appId and an image as file (a File), fileData (bytes), or url. A file is sent as multipart/form-data, the way usersSetPhoto sends its image.
  • It needs a user token with app_configurations:write. A manager app token can only set icons for apps that manager app created.

This is part 1 of 1 in the apps.icon stack, which is based on main. This pull request is in batch B7 app settings.

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

Testing

Run the remote tests for this layer:

  • test_with_remote_apis.methods.apps_icon_Test with the config token store that apps_manifest_Test uses (SLACK_SDK_TEST_APP_MANIFEST_API_TEAM_ID, SLACK_SDK_TEST_APP_MANIFEST_API_USER_ID)

The test creates an app with apps.manifest.create, sets its icon three ways, and deletes the app. Each form returned ok:

Form Image Result
fileData generated 512x512px PNG bytes ok
file the same PNG written to a temp File ok
url a publicly hosted 560x560px PNG ok

An app created from a manifest isn't installed, so the API can't show its icon. To check that each form changes the icon, the same three calls ran against an app installed with the Slack CLI, using its user token. After each call, the bot user's avatar_hash in users.list changed, and the new 512px avatar matched what was sent: red for file, the hosted image for url, and blue for fileData. The app was deleted afterward. The test makes the three calls with the async client, which waits out Retry-After on its own if back-to-back icon changes return ratelimited.

Category

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

🤖 Generated with Claude Code

@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 73.80%. Comparing base (8fa0566) to head (bc5a4fa).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...java/com/slack/api/methods/RequestFormBuilder.java 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1707      +/-   ##
============================================
- Coverage     73.95%   73.80%   -0.15%     
+ Complexity     4752     4750       -2     
============================================
  Files           487      487              
  Lines         14811    14826      +15     
  Branches       1536     1538       +2     
============================================
- Hits          10953    10943      -10     
- Misses         2943     2965      +22     
- Partials        915      918       +3     
Flag Coverage Δ
jdk-14 73.80% <80.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg changed the base branch from zimeg-feat-admin-conversations-unlink-objects to main November 18, 2026 06:15
@zimeg
zimeg force-pushed the zimeg-feat-apps-icon-set branch from 208949c to b840ce1 Compare November 18, 2026 06:15

This branch has not been deployed

No deployments
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 project:slack-api-client project:slack-api-client semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant