A list of all methods in the IntegrationsService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
saveInboxInstallation | Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. |
startInboxInstallation | Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. |
saveSlackInstallation | Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. |
finishSlackInstallation | Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack. |
startSlackInstallation | Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. |
saveTemplatesInstallation | Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. |
saveWebPushInstallation | Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. |
startWebPushInstallation | Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. |
Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
- HTTP Method:
POST
- Endpoint:
/integrations/inbox/installations
Parameters
Name | Type | Required | Description |
---|---|---|---|
inboxConfig | InboxConfig | ❌ | Request Body |
Return Type
InboxConfig
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.Banner;
import com.magicbell.magicbelluserclient.models.DefaultHover;
import com.magicbell.magicbelluserclient.models.DefaultState;
import com.magicbell.magicbelluserclient.models.Default_;
import com.magicbell.magicbelluserclient.models.Dialog;
import com.magicbell.magicbelluserclient.models.Footer;
import com.magicbell.magicbelluserclient.models.Header;
import com.magicbell.magicbelluserclient.models.Icon;
import com.magicbell.magicbelluserclient.models.Images;
import com.magicbell.magicbelluserclient.models.InboxConfig;
import com.magicbell.magicbelluserclient.models.Notification;
import com.magicbell.magicbelluserclient.models.Theme;
import com.magicbell.magicbelluserclient.models.Unread;
import com.magicbell.magicbelluserclient.models.UnreadHover;
import com.magicbell.magicbelluserclient.models.UnreadState;
import com.magicbell.magicbelluserclient.models.Unseen;
import com.magicbell.magicbelluserclient.models.UnseenBadge;
import com.magicbell.magicbelluserclient.models.UnseenHover;
import com.magicbell.magicbelluserclient.models.UnseenState;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
Images images = Images.builder()
.emptyInboxUrl("emptyInboxUrl")
.build();
Banner banner = Banner.builder()
.backgroundColor("backgroundColor")
.backgroundOpacity(8.96D)
.fontSize("fontSize")
.textColor("textColor")
.build();
Dialog dialog = Dialog.builder()
.accentColor("accentColor")
.backgroundColor("backgroundColor")
.textColor("textColor")
.build();
Footer footer = Footer.builder()
.backgroundColor("backgroundColor")
.borderRadius("borderRadius")
.fontSize("fontSize")
.textColor("textColor")
.build();
Header header = Header.builder()
.backgroundColor("backgroundColor")
.borderRadius("borderRadius")
.fontFamily("fontFamily")
.fontSize("fontSize")
.textColor("textColor")
.build();
Icon icon = Icon.builder()
.borderColor("borderColor")
.width("width")
.build();
DefaultHover defaultHover = DefaultHover.builder()
.backgroundColor("backgroundColor")
.build();
DefaultState defaultState = DefaultState.builder()
.color("color")
.build();
Default_ default_ = Default_.builder()
.backgroundColor("backgroundColor")
.borderRadius("borderRadius")
.fontFamily("fontFamily")
.fontSize("fontSize")
.hover(defaultHover)
.margin("margin")
.state(defaultState)
.textColor("textColor")
.build();
UnreadHover unreadHover = UnreadHover.builder()
.backgroundColor("backgroundColor")
.build();
UnreadState unreadState = UnreadState.builder()
.color("color")
.build();
Unread unread = Unread.builder()
.backgroundColor("backgroundColor")
.hover(unreadHover)
.state(unreadState)
.textColor("textColor")
.build();
UnseenHover unseenHover = UnseenHover.builder()
.backgroundColor("backgroundColor")
.build();
UnseenState unseenState = UnseenState.builder()
.color("color")
.build();
Unseen unseen = Unseen.builder()
.backgroundColor("backgroundColor")
.hover(unseenHover)
.state(unseenState)
.textColor("textColor")
.build();
Notification notification = Notification.builder()
.default_(default_)
.unread(unread)
.unseen(unseen)
.build();
UnseenBadge unseenBadge = UnseenBadge.builder()
.backgroundColor("backgroundColor")
.build();
Theme theme = Theme.builder()
.banner(banner)
.dialog(dialog)
.footer(footer)
.header(header)
.icon(icon)
.notification(notification)
.unseenBadge(unseenBadge)
.build();
InboxConfig inboxConfig = InboxConfig.builder()
.images(images)
.locale("locale")
.theme(theme)
.build();
val response: InboxConfig = magicbellUserClient.integrations.saveInboxInstallation(inboxConfig);
println(response);
}
Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
- HTTP Method:
POST
- Endpoint:
/integrations/inbox/installations/start
Return Type
InboxConfig
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.InboxConfig;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
val response: InboxConfig = magicbellUserClient.integrations.startInboxInstallation();
println(response);
}
Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
- HTTP Method:
POST
- Endpoint:
/integrations/slack/installations
Parameters
Name | Type | Required | Description |
---|---|---|---|
slackInstallation | SlackInstallation | ❌ | Request Body |
Return Type
SlackInstallation
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.AuthedUser;
import com.magicbell.magicbelluserclient.models.Enterprise;
import com.magicbell.magicbelluserclient.models.IncomingWebhook;
import com.magicbell.magicbelluserclient.models.SlackInstallation;
import com.magicbell.magicbelluserclient.models.Team;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
AuthedUser authedUser = AuthedUser.builder()
.accessToken("access_token")
.expiresIn(5L)
.id("id")
.refreshToken("refresh_token")
.scope("scope")
.tokenType("token_type")
.build();
Enterprise enterprise = Enterprise.builder()
.id("id")
.name("name")
.build();
IncomingWebhook incomingWebhook = IncomingWebhook.builder()
.channel("channel")
.configurationUrl("configuration_url")
.url("url")
.build();
Team team = Team.builder()
.id("id")
.name("name")
.build();
SlackInstallation slackInstallation = SlackInstallation.builder()
.accessToken("access_token")
.appId("app_id")
.authedUser(authedUser)
.botUserId("bot_user_id")
.enterprise(enterprise)
.expiresIn(10L)
.id("626")
.incomingWebhook(incomingWebhook)
.isEnterpriseInstall(false)
.refreshToken("refresh_token")
.scope("scope")
.team(team)
.tokenType("token_type")
.build();
val response: SlackInstallation = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation);
println(response);
}
Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack.
- HTTP Method:
POST
- Endpoint:
/integrations/slack/installations/finish
Parameters
Name | Type | Required | Description |
---|---|---|---|
slackFinishInstallResponse | SlackFinishInstallResponse | ❌ | Request Body |
Return Type
SlackInstallation
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.SlackFinishInstallResponse;
import com.magicbell.magicbelluserclient.models.SlackInstallation;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
SlackFinishInstallResponse slackFinishInstallResponse = SlackFinishInstallResponse.builder()
.appId("app_id")
.code("code")
.redirectUrl("redirect_url")
.build();
val response: SlackInstallation = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse);
println(response);
}
Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
- HTTP Method:
POST
- Endpoint:
/integrations/slack/installations/start
Parameters
Name | Type | Required | Description |
---|---|---|---|
slackStartInstall | SlackStartInstall | ❌ | Request Body |
Return Type
SlackStartInstallResponseContent
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.SlackStartInstall;
import com.magicbell.magicbelluserclient.models.SlackStartInstallResponseContent;
import java.util.Arrays;
import java.util.List;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
List<String> extraScopes = Arrays.asList("extra_scopes");
SlackStartInstall slackStartInstall = SlackStartInstall.builder()
.appId("app_id")
.authUrl("auth_url")
.extraScopes(extraScopes)
.redirectUrl("redirect_url")
.build();
val response: SlackStartInstallResponseContent = magicbellUserClient.integrations.startSlackInstallation(slackStartInstall);
println(response);
}
Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
- HTTP Method:
POST
- Endpoint:
/integrations/templates/installations
Parameters
Name | Type | Required | Description |
---|---|---|---|
templatesInstallation | TemplatesInstallation | ❌ | Request Body |
Return Type
TemplatesInstallation
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.TemplatesInstallation;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
TemplatesInstallation templatesInstallation = TemplatesInstallation.builder()
.category("category")
.channel("channel")
.text("text")
.build();
val response: TemplatesInstallation = magicbellUserClient.integrations.saveTemplatesInstallation(templatesInstallation);
println(response);
}
Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
- HTTP Method:
POST
- Endpoint:
/integrations/web_push/installations
Parameters
Name | Type | Required | Description |
---|---|---|---|
webPushToken | WebPushToken | ❌ | Request Body |
Return Type
WebPushToken
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.Keys;
import com.magicbell.magicbelluserclient.models.WebPushToken;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
Keys keys = Keys.builder()
.auth("auth")
.p256dh("p256dh")
.build();
WebPushToken webPushToken = WebPushToken.builder()
.endpoint("endpoint")
.keys(keys)
.build();
val response: WebPushToken = magicbellUserClient.integrations.saveWebPushInstallation(webPushToken);
println(response);
}
Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
- HTTP Method:
POST
- Endpoint:
/integrations/web_push/installations/start
Return Type
WebPushStartInstallationResponse
Example Usage Code Snippet
import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.models.WebPushStartInstallationResponse;
fun main() {
val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();
val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config);
val response: WebPushStartInstallationResponse = magicbellUserClient.integrations.startWebPushInstallation();
println(response);
}