How to retrieve Monday url in item view?

Hi there :wave:,
I’m building an item view. I’m trying to find out how to retrieve the Monday.com subdomaine (or url) of a user (I mean the xxx in xxx.monday.com). I need to build a link to an item.
What is the best way to achieve that?

Hi @jeromeskiply
You can perform an api call to get the current user’s account slug:
query{me {account {slug}}}

slug is the subdomain, so you can construct it like this:
https://{SLUG}.monday.com

2 Likes

Thank you @VladMonday.

Hey y’all! Wanted to follow up on this with an alternate solution in case other users find this thread.

If your app has the boards:read scope, you can also retrieve the slug of an account by querying the board’s owner. Here’s an example query:

query{
  boards(ids:[123456789]) {
    owner {
      account {
        slug
      }
    }
  }
}