GET
/
v2
/
user
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.user.getAuthUser();

  // Handle the result
  console.log(result);
}

run();
{
  "user": {
    "createdAt": 1630748523395,
    "softBlock": {
      "blockedAt": 123,
      "reason": "SUBSCRIPTION_CANCELED",
      "blockedDueToOverageType": "analyticsUsage"
    },
    "billing": {},
    "resourceConfig": {
      "nodeType": "<string>",
      "concurrentBuilds": 123,
      "buildEntitlements": {
        "enhancedBuilds": true
      },
      "awsAccountType": "<string>",
      "awsAccountIds": [
        "<string>"
      ],
      "cfZoneName": "<string>",
      "imageOptimizationType": "<string>",
      "edgeConfigs": 123,
      "edgeConfigSize": 123,
      "edgeFunctionMaxSizeBytes": 123,
      "edgeFunctionExecutionTimeoutMs": 123,
      "serverlessFunctionDefaultMaxExecutionTime": 123,
      "serverlessFunctionMaxMemorySize": 123,
      "kvDatabases": 123,
      "postgresDatabases": 123,
      "blobStores": 123,
      "integrationStores": 123,
      "cronJobs": 123,
      "cronJobsPerProject": 123,
      "microfrontendGroupsPerTeam": 123,
      "microfrontendProjectsPerGroup": 123,
      "flagsExplorerOverridesThreshold": 123,
      "flagsExplorerUnlimitedOverrides": true,
      "customEnvironmentsPerProject": 123,
      "buildMachine": {
        "purchaseType": "enhanced",
        "isDefaultBuildMachine": true,
        "cores": 123,
        "memory": 123
      }
    },
    "stagingPrefix": "<string>",
    "activeDashboardViews": [
      {
        "scopeId": "<string>",
        "viewPreference": "list",
        "favoritesViewPreference": "open",
        "recentsViewPreference": "open"
      }
    ],
    "importFlowGitNamespace": "<string>",
    "importFlowGitNamespaceId": "<string>",
    "importFlowGitProvider": "github",
    "preferredScopesAndGitNamespaces": [
      {
        "scopeId": "<string>",
        "gitNamespaceId": "<string>"
      }
    ],
    "dismissedToasts": [
      {
        "name": "<string>",
        "dismissals": [
          {
            "scopeId": "<string>",
            "createdAt": 123
          }
        ]
      }
    ],
    "favoriteProjectsAndSpaces": [
      {
        "teamId": "<string>",
        "projectId": "<string>"
      }
    ],
    "hasTrialAvailable": true,
    "remoteCaching": {
      "enabled": true
    },
    "dataCache": {
      "excessBillingEnabled": true
    },
    "featureBlocks": {
      "webAnalytics": {
        "blockedFrom": 123,
        "blockedUntil": 123,
        "isCurrentlyBlocked": true
      }
    },
    "northstarMigration": {
      "teamId": "<string>",
      "projects": 123,
      "stores": 123,
      "integrationConfigurations": 123,
      "integrationClients": 123,
      "startTime": 123,
      "endTime": 123
    },
    "id": "AEIIDYVk59zbFF2Sxfyxxmua",
    "email": "me@example.com",
    "name": "John Doe",
    "username": "jdoe",
    "avatar": "22cb30c85ff45ac4c72de8981500006b28114aa1",
    "defaultTeamId": "<string>",
    "version": "northstar"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Response

200
application/json

Successful response.

user
object
required

Data for the currently authenticated User.