Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for apps.manifest.* endpoints #1690

Merged
merged 4 commits into from Nov 11, 2023
Merged

Conversation

misscoded
Copy link
Contributor

Summary

Fixes #1340

Requirements (place an x in each [ ])

@misscoded misscoded added semver:minor enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Nov 7, 2023
@seratch seratch added this to the web-api@7.0 milestone Nov 7, 2023
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Thanks for the addition. Mentioned one missing optional parameter

packages/web-api/src/methods.ts Show resolved Hide resolved
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
options.slackApiUrl = process.env.SLACK_SDK_TEST_DEV_API_URL;
}

const client = new WebClient(BOT_TOKEN, options);
Copy link
Member

Choose a reason for hiding this comment

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

We should verify if a WebClient instance can work without a bot token in this scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the token used for BOT_TOKEN is irrelevant for the testing of the endpoints since they rely on the tooling token override, correct? The endpoints will not work with a non-tooling token, if that's what you mean.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you're right. The bot token is not necessary at all. Removing it makes the code more realistic and we should demonstrate how to use the API client usually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing it makes the code more realistic

Won't most folks using the manifest API have a client that's instantiated using a bot token (or user token)? Happy to remove it, but want to clarify we're on the same page.

Copy link
Member

Choose a reason for hiding this comment

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

When it comes to a bolt app, yes it is. However, in this case, a developer using the client for the app manifest scenario may not have any bot token, right? (say, starting a new app development). Indeed, a developer may initialize the client with a bot token (as part of a larger code base or due to whatever reasons), but this assuption does not cover all use cases. The e2e test code should make sure if it works for most common use cases. Regarding the APIs we're working on now, I believe the primary one is without a bot token, and then secoundary could be with a bot token. Does this make sense to you?

Copy link
Member

Choose a reason for hiding this comment

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

Just approved. Once this integration test is improved, go ahead with merging this PR 👍

@misscoded misscoded merged commit 7089a47 into main Nov 11, 2023
1 check passed
@filmaj filmaj modified the milestones: web-api@7.0, web-api@6.10 Nov 14, 2023
@filmaj
Copy link
Contributor

filmaj commented Nov 14, 2023

FYI I have cherry-picked this merged commit to the web-api-6.x maintenance branch and will cut a 6.10 release of web-api from there.

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 pkg:web-api applies to `@slack/web-api` semver:minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for apps.manifest.* Endpoints
3 participants