Start integrating with ONEiO for free!
SIGN UP

Endpoint Type Configuration Guide - Slack

Endpoint details

In this document, you will find detailed info about the Slack endpoint. This Endpoint Type is a self-service type, so users can add them without a need to reach out to ONEiO Support.

Endpoint_type_configuration-Slack1.jpeg

 

  General
Status Sets the status of the endpoint. Active / Suspended.
When an endpoint is suspended, it will continue to receive messages but won't process them. Instead, the messages will be temporarily stored in a queue and processed later once the endpoint status changes back to Active. It's important to note that during suspension, the endpoint will not send out any messages.
Name Name of the endpoint. It is recommended to use short names since this name is used in displays throughout ONEiO.
Timezone The timezone used in the Slack application

 

  [Your Slack App]->ONEiO
Receiver Address The address to insert to Slack Request Url when sending requests to ONEiO The targets are different when operating in QA or Production.
  • QA -> https://[USERNAME]:[PASSWORD]@rest-receiver-test.service-flow.com/api
  • Production -> https://[USERNAME]:[PASSWORD]@rest-receiver.service-flow.com/api
Username Your endpoint ID (automatic)
You can reset and retrieve a new password in edit mode.

 

  ONEiO ->[Your Slack App]
Both User OAuth Token The Bearer Token used to authenticate towards Slack App.
It's generated by Slack App (OAuth & permissions) and starts with "xoxb".
When adding the Bearer token, add it as "Bearer [your-token]"
Ex: Bearer xoxb-1234567890abcde1234567890
Unrecoverable HTTP error codes List of numeric HTTP response codes that are to be handled as non-recoverable when sending messages to Slack API.
If ONEiO receives an error code that is not on the list, it will retry the message automatically. If ONEiO receives an error code that IS on this list, the message will result in an error.

 

Entity types

This slack endpoint uses only one entity type, which is enough for all Slack interactions except for events.

Message types:

Response Template handle Slack's API method views.open, used for interactions such modals and commands. 
Message handles Slack's API method chat.postMessage, used for sending messages to a Slack channel/user

 

Common HTTP error codes

Slack will respond with a 200 - OK status code for almost all requests, including errors.

To debug errors, it is necessary to check the response body of the message.

Here is a list of common errors from views.open and chat.postMessage. For more errors, please refer to the API method at Slack API methods.

The common error has a similar format, where "ok: false" means it's an error, "error: error_type" says what kind of error is it, and "response_metadata" returns more details about the error.

{
    "ok": false,
    "error": "invalid_arguments",
    "response_metadata": {
        "messages": [
            "[ERROR] missing required field: view"
        ]
    }
}

 

Error action
invalid_auth
not_authed
no_permission

Verify your Bot User OAuth Token, if is provided, if is the same configured in your Slack API, and if was inserted using the right format - "Bearer [your token]"
invalid_arguments
invalid_arg_name

There is a missing argument or an invalid argument.

The message feed if the sent payload contains the basic arguments (attributes) for each method below:

views.open: trigger_id,view
message: channeltext and/or blocks

if you changed any attribute name, check also in Slack API documentation if the method accepts the changed attribute name as a valid argument.

missing_scope Verify in your Slack APP if you granted the needed scopes for the provided token. 
channel_not_found
not_in_channel
Invalid channel/user or the app is not part of the channel provided in the channel attribute.

 

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.