Error integrating Confluence and Slack - "Error code: WRONG_ID"
Asked by Russell Zera:

Hey yall,

Anyone else running into issues when trying to integrate Slack with Confluence Cloud? It prompts me that I can integrate with Confluence for Slack app, and I click "Log in", then it takes me to an authentication page, which I progress past, then it asks me which slack workspace I want to connect to, which I also select appropriately... It then gives me the error "You've logged in to wrong Slack workspace" "Error code: WRONG_ID". The problem is that we have Slack Enterprise Grid, and so the integration seems to be looking only for the first slack workspace on our grid to have used the integration for Confluence for Slack app, which is not the workspace I am trying to connect.![Annotation 2020-08-24 100737.png](/t5/image/serverpage/image-id/107707i04A9710ED1521B65/image-size/large?v=v2&px=999 "Annotation 2020-08-24 100737.png")  

Anyone run into this before? I have attached screenshot of the error as well.


Answers:
author: Luiz Silva
body: Hi [@Russell Zera](/t5/user/viewprofilepage/user-id/1019319),

I'm sorry for the late response and for the inconvenience you're going through.

I also have experienced some particular issues while authorizing Slack apps. From that experience, I know that that error usually happens under the following circumstances:

1. You get a login prompt and click on it.   
   **In this step, the Confluence app will pass the target workspace to Slack.**
2. When you get to the Slack authorization page, it happens you are not logged into that expected workspace *in your browser* , so Slack shows the workspace selector and allows you authorizing into a different workspace.  
   **As far as I can tell, if you're logged into the correct workspace in your browser, the workspace selector will not be displayed by Slack.**
3. After authorization the app will receive the authorization for the other workspace and treat this as a mistake, thus the message you are seeing.

The fact that you are in an Enterprise Grid makes things even more confusing, since the same ephemeral messages you get in one workspace are visible in others and, clicking on a login button generated in a different workspace, may indeed lead you to that error as it will expect the authorization for the first workspace.

Therefore I suggest, if you could, please, make sure you are logged into your workspace in your browser, either by:

1. performing a manual login into Slack in your browser; or
2. (the way I prefer because it's easier) you can go to your Slack client, click on the workspace name (top left corner) to open the dropdown menu, and click **Customize \<Workspace name\>**. That should open your browser and log you in automatically.

After that, please, try again logging into the app, either by:

1. clicking the login button from a login prompt; or
2. using the slash command **/confluence login <https://yoursite.atlassian.net/wiki/>**. That will generate a login button specifically targeting the current workspace so you can be sure where you are logging into.

I hope it helps. Please let me know if you fixed the issue.

Cheers!

comments: author: Gunnar Kelders
body: Hi,

I'm running into a similar issue with BitBucket. I have tried your suggestion to login via the browser and all that, but I'm still bugged with the WRONG_ID error and no BitBucket content is displayed when I post a link.

After posting a BB-link I get the following message from the BitBucket app in Slack:
> Looks like you've just shared a link to a private repository! To display content from links like that right from Slack, link your Bitbucket Cloud account.

With three buttons below it: Link account, More info, Don't ask again

I am able to see BitBucket content when posting a link to a channel where that repository is linked for notifications, but in DM I cannot see the content (while the recipient does!).

I have only 1 Slack workspace and only 1 Atlassian workspace, so logging into the wrong workspace is not a mistake I'm making.

Could you please help me sort this out?

Thanks in advance!


Tags: cloud

confluence-cloud

slack