Getting "Workspace not found" error when setting up a GraphQL WSS subscription

Hey folks, I’ve seen a few of these but none of the currently open posts seem to be having this exact issue.

I’ve set up my apollo client to subscribe to 8base webhooks, but I keep getting “Workspace not found” errors. I’ve checked and re-checked the data and I’m definitely sending a valid workspace ID and token.

Here’s the relevant part of the setup in apollo:

const wsLink = new WebSocketLink({
  uri: "wss://ws.8base.com/",
  options: {
    reconnect: true,
    connectionParams: {
      /**
       * WorkspaceID MUST be set or the Websocket Endpoint won't be able to
       * map the request to the appropriate workspace
       */
      workspaceId: "MY_WORKSPACE_ID",
      token: "MY_AUTH_TOKEN",
    },
  },
});

And the logs from websockets:

Data sent:

{
  "type": "connection_init",
  "payload": {
    "workspaceId": "[hidden]",
    "token": "[hidden]"
  }
}

Data Received:

{
  "id": null,
  "type": "connection_error",
  "payload": {
    "message": "Workspace not found",
    "code": "EntityNotFoundError",
    "details": { "workspaceId": "Workspace not found" }
  }
}

Happy to share the project if people need to see it. I’m not sure what’s missing here.

Hello @samdbeckham !
Are you sure workspaceId is correct? :slight_smile: Can you send it to me in a private message?

I’m pretty sure it is. I don’t have the privileges on this forum to send you a private message unfortunately, but I’m getting the workspace ID from the box on the settings page. If you can give me those permissions I can send you it.

Could you send it to foma.bagiyan@8base.com ?

Yup, sent :slight_smile:

Adding more characters so I can post this response

1 Like

Got it, thanks! I will come back to you shortly.

@samdbeckham It’s very strange, actually I couldn’t find the workspace with the Id you sent me.
Are you 100% sure you’re logged in, entered this workspace and see the workspaceId in Settings - General?