TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation User Users and search Get User By Username

Get User By Username

On this page

GraphQL endpoint: /user

Fetches a user profile by username. Profile fields are filtered by the owner's visibility settings and the viewer's relationship to the user, exactly like fetching a user by id.

Query

query ($username: String!) {
  userByUsername(username: $username) {
    id
    username
    firstName
    middleName
    lastName
    aboutMe
    emails {
      email
      visibility
    }
    telephoneNumbers {
      number
      visibility
    }
    nameVisibility
    aboutMeVisibility
  }
}

Variables

{
  "username": "username3"
}

Response

{
  "data": {
    "userByUsername": {
      "aboutMe": "this is my generic intro",
      "aboutMeVisibility": [
        "PUBLIC"
      ],
      "emails": [
        {
          "email": "test1@email.com",
          "visibility": [
            "PUBLIC"
          ]
        }
      ],
      "firstName": "1john",
      "id": "00000000-0000-4000-8000-000000000001",
      "lastName": "2doe",
      "middleName": "ray",
      "nameVisibility": [
        "PUBLIC"
      ],
      "telephoneNumbers": [
        {
          "number": "2",
          "visibility": [
            "PUBLIC"
          ]
        }
      ],
      "username": "username3"
    }
  }
}