How to list all user workspaces using slack api?

Viewed 123

After we get the user access token using Sign in with slack, we can query identity information as shown below:

{
  ok: true,
  user: {
    name: 'arbxxxxxxx',
    id: 'U0XXXXXXX',
    email: 'arbxxxxxxx@xxxxxxx.com'
  },
  team: { id: 'T0XXXXXXX' },
  response_metadata: {
    scopes: [ 'identity.basic', 'identity.email', 'openid' ],
    acceptedScopes: [ 'identity.basic' ]
  }
}

The current workspace is team: { id: 'T0XXXXXXX' }.

How can I get all the other workspaces?

FYI: Sign in and acces token usage is shown in at this gist: https://gist.github.com/seratch/92bf98679d7a37a87dfa7376d02a51a1

1 Answers

With the exception of Org Apps installed on a Grid, users actually auth per workspace, and each is a unique identity, there's no real concept of a single identity that spans across workspaces

Related