You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to add test cases to make sure that Gratibot can interact with external services successfully. Integration points include CosmosDB, Slack
The text was updated successfully, but these errors were encountered:
Did some digging to see how we can automate the creation of a new app and install it into the workspace for integration testing:
Creating the slack app
First, you need to obtain an OAuth access token that you will use to authenticate your API requests. You can do this by creating a new Slack app in the Slack App Directory and then generating an OAuth access token for the app.
Next, you can use the apps.create API method to create a new Slack app. Here's an example API request:
POST https://slack.com/api/apps.create
Content-type: application/json
Authorization: Bearer <your-bot-token>
{
"name": "My New App",
"description": "This is a new Slack app",
"privacy_policy_url": "https://www.example.com/privacy_policy",
"redirect_uris": ["https://www.example.com/oauth_redirect"],
"scopes": {
"bot": {
"channels:history": true,
"channels:join": true,
"chat:write": true
}
}
}
Once you have submitted the API request, the apps.create method will return a JSON response that contains information about the newly created app, including its app ID and client ID. You can use these IDs to configure and interact with the app in the Slack API.
2. request permission scopes from users in the workspace. You can do this by calling the apps.permissions.request API method and passing in the necessary parameters. For example, to request the app_mentions:read scope, you can use the following API request:
Once you have received permission from the necessary users, you can use the Slack API's apps.installations.create method to install the app in the workspace. This API method will return an installation object that you can use to interact with the app in the workspace.
We would like to add test cases to make sure that Gratibot can interact with external services successfully. Integration points include CosmosDB, Slack
The text was updated successfully, but these errors were encountered: