Viewer

Query the authenticated user's details and associated accounts.

Returns the authenticated user's details. Use this to verify your token is working or to list the accounts you have access to.

viewer

Lookup the details of the authenticated user.

Example Request

query {
  viewer {
    id
    firstName
    lastName
    email
  }
}

Example Response

{
  "data": {
    "viewer": {
      "id": "VXNlcjp6a2dkZXk=",
      "firstName": "John",
      "lastName": "Doe",
      "email": "[john.doe@example.com]",
    }
  }
}

Objects

User

FieldTypeDescription
idID!The ID of the object.
firstNameString!First name of the user.
lastNameString!Last name of the user.
emailString!Email of the user.
isBetaTesterBoolean!Whether the user is a beta tester.
analyticsIdStringAnalytics identifier for the user.
ideSubscriptionIDESubscriptionThe user's IDE subscription details.
accountsAccountConnectionAll the accounts associated with the user. This includes the team accounts the user is part of and the individual accounts they have added on DeepSource.

IDESubscription

IDE subscription details for a user.

FieldTypeDescription
planIDESubscriptionPlan!The user's IDE subscription plan.

On this page