Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
Get the User
Retrieves information related to the currently authenticated 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
Default authentication mechanism
Response
Successful response.
Data for the currently authenticated User.
UNIX timestamp (in milliseconds) when the User account was created.
1630748523395
When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why.
SUBSCRIPTION_CANCELED
, SUBSCRIPTION_EXPIRED
, UNPAID_INVOICE
, ENTERPRISE_TRIAL_ENDED
, FAIR_USE_LIMITS_EXCEEDED
, BLOCKED_FOR_PLATFORM_ABUSE
analyticsUsage
, artifacts
, bandwidth
, blobTotalAdvancedRequests
, blobTotalAvgSizeInBytes
, blobTotalGetResponseObjectSizeInBytes
, blobTotalSimpleRequests
, dataCacheRead
, dataCacheWrite
, edgeConfigRead
, edgeConfigWrite
, edgeFunctionExecutionUnits
, edgeMiddlewareInvocations
, edgeRequestAdditionalCpuDuration
, edgeRequest
, elasticConcurrencyBuildSlots
, fastDataTransfer
, fastOriginTransfer
, functionDuration
, functionInvocation
, imageOptimizationCacheRead
, imageOptimizationCacheWrite
, imageOptimizationTransformation
, logDrainsVolume
, monitoringMetric
, blobDataTransfer
, observabilityEvent
, postgresComputeTime
, postgresDataStorage
, postgresDataTransfer
, postgresDatabase
, postgresWrittenData
, serverlessFunctionExecution
, sourceImages
, storageRedisTotalBandwidthInBytes
, storageRedisTotalCommands
, storageRedisTotalDailyAvgStorageInBytes
, storageRedisTotalDatabases
, wafOwaspExcessBytes
, wafOwaspRequests
, wafRateLimitRequest
, webAnalyticsEvent
An object containing billing infomation associated with the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
enhanced
, ultra
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
An object containing infomation related to the amount of platform resources may be allocated to the User account.
Prefix that will be used in the URL of "Preview" deployments created by the User account.
Whether the user has a trial available for a paid plan subscription.
The User's unique identifier.
"AEIIDYVk59zbFF2Sxfyxxmua"
Email address associated with the User account.
"me@example.com"
Name associated with the User account, or null
if none has been provided.
"John Doe"
Unique username associated with the User account.
"jdoe"
SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image.
"22cb30c85ff45ac4c72de8981500006b28114aa1"
The user's default team.
The user's version. Will always be northstar
.
northstar
set of dashboard view preferences (cards or list) per scopeId
set of dashboard view preferences (cards or list) per scopeId
list
, cards
open
, closed
open
, closed
github
, gitlab
, bitbucket
, github-custom-host
A record of when, under a certain scopeId, a toast was dismissed
A record of when, under a certain scopeId, a toast was dismissed
The ID of the team we created for this user.
The number of projects migrated for this user.
The number of stores migrated for this user.
The number of integration configurations migrated for this user.
The number of integration clients migrated for this user.
The migration start time timestamp for this user.
The migration end time timestamp for this 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"
}
}