Skip to main content

How to retrieve Monday url in item view?

  • October 19, 2020
  • 4 replies
  • 2297 views

jeromeskiply

Hi there 👋,
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?

This topic has been closed for replies.

4 replies

VladMonday
Forum|alt.badge.img
  • monday.com Team Member
  • October 19, 2020

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


jeromeskiply
  • Author
  • Participating Frequently
  • October 19, 2020

Thank you @VladMonday.


dipro
Forum|alt.badge.img
  • Leader
  • November 23, 2020

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
      }
    }
  }
}

  • March 5, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.