slack-orb icon indicating copy to clipboard operation
slack-orb copied to clipboard

Allow custom domain for Slack API to send message

Open luncliff opened this issue 2 years ago • 1 comments

Describe Request:

Hi. I'm trying to use this orb(v4.9 actually). And got invalid_auth error. After short survey, I found the slack/notify is sending message to https://slack.com/api/chat.postMessage. We are using different domain for the Slack, It will be helpful if we can customize API server to send the message.

Examples:

Need some field like api_host.

- slack/notify:
    circleci_host: "https://circleci.abcc.com"
    api_host: "abcc" # (optional) send to https://abcc.slack.com/api/chat.postMessage
    channel: C0123456789 

luncliff avatar Jul 26 '22 09:07 luncliff

Hi @luncliff 👋

Thanks for suggesting this feature! We will be looking into implementing it.

EricRibeiro avatar Sep 14 '22 18:09 EricRibeiro

I looked into it, and all workspaces in Slack are accessed via a subdomain. This does not affect the API behaviour, nor are we expected to change the host based on the workspace. I believe your issue stems from token or permission issues.

I highly encourage you to go through the Wiki and verify if all environment variables and permissions are in place.

EricRibeiro avatar Nov 02 '22 21:11 EricRibeiro

I see... I will check with the team where manages it. Thanks for the survey!

luncliff avatar Nov 03 '22 01:11 luncliff