import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.user.getAuthUser();
console.log(result);
}
run();{
"user": {
"createdAt": 1630748523395,
"softBlock": {
"blockedAt": 123,
"reason": "SUBSCRIPTION_CANCELED",
"blockedDueToOverageType": "analyticsUsage"
},
"billing": {},
"resourceConfig": {
"nodeType": "<string>",
"concurrentBuilds": 123,
"elasticConcurrencyEnabled": true,
"buildEntitlements": {
"enhancedBuilds": true
},
"buildQueue": {
"configuration": "SKIP_NAMESPACE_QUEUE"
},
"awsAccountType": "<string>",
"awsAccountIds": [
"<string>"
],
"cfZoneName": "<string>",
"imageOptimizationType": "<string>",
"edgeConfigs": 123,
"edgeConfigSize": 123,
"edgeFunctionMaxSizeBytes": 123,
"edgeFunctionExecutionTimeoutMs": 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
},
"security": {
"customRules": 123,
"ipBlocks": 123,
"ipBypass": 123,
"rateLimit": 123
}
},
"stagingPrefix": "<string>",
"hasTrialAvailable": true,
"id": "AEIIDYVk59zbFF2Sxfyxxmua",
"email": "me@example.com",
"name": "John Doe",
"username": "jdoe",
"avatar": "22cb30c85ff45ac4c72de8981500006b28114aa1",
"defaultTeamId": "<string>",
"activeDashboardViews": [
{
"scopeId": "<string>",
"viewPreference": "list",
"favoritesViewPreference": "open",
"recentsViewPreference": "open"
}
],
"importFlowGitNamespace": "<string>",
"importFlowGitNamespaceId": "<string>",
"importFlowGitProvider": "gitlab",
"preferredScopesAndGitNamespaces": [
{
"scopeId": "<string>",
"gitNamespaceId": "<string>"
}
],
"dismissedToasts": [
{
"name": "<string>",
"dismissals": [
{
"scopeId": "<string>",
"createdAt": 123
}
]
}
],
"favoriteProjectsAndSpaces": [
{
"teamId": "<string>",
"projectId": "<string>"
}
],
"remoteCaching": {
"enabled": true
},
"dataCache": {
"excessBillingEnabled": true
},
"featureBlocks": {
"webAnalytics": {
"isCurrentlyBlocked": true,
"blockedFrom": 123,
"blockedUntil": 123
}
}
}
}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();
console.log(result);
}
run();{
"user": {
"createdAt": 1630748523395,
"softBlock": {
"blockedAt": 123,
"reason": "SUBSCRIPTION_CANCELED",
"blockedDueToOverageType": "analyticsUsage"
},
"billing": {},
"resourceConfig": {
"nodeType": "<string>",
"concurrentBuilds": 123,
"elasticConcurrencyEnabled": true,
"buildEntitlements": {
"enhancedBuilds": true
},
"buildQueue": {
"configuration": "SKIP_NAMESPACE_QUEUE"
},
"awsAccountType": "<string>",
"awsAccountIds": [
"<string>"
],
"cfZoneName": "<string>",
"imageOptimizationType": "<string>",
"edgeConfigs": 123,
"edgeConfigSize": 123,
"edgeFunctionMaxSizeBytes": 123,
"edgeFunctionExecutionTimeoutMs": 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
},
"security": {
"customRules": 123,
"ipBlocks": 123,
"ipBypass": 123,
"rateLimit": 123
}
},
"stagingPrefix": "<string>",
"hasTrialAvailable": true,
"id": "AEIIDYVk59zbFF2Sxfyxxmua",
"email": "me@example.com",
"name": "John Doe",
"username": "jdoe",
"avatar": "22cb30c85ff45ac4c72de8981500006b28114aa1",
"defaultTeamId": "<string>",
"activeDashboardViews": [
{
"scopeId": "<string>",
"viewPreference": "list",
"favoritesViewPreference": "open",
"recentsViewPreference": "open"
}
],
"importFlowGitNamespace": "<string>",
"importFlowGitNamespaceId": "<string>",
"importFlowGitProvider": "gitlab",
"preferredScopesAndGitNamespaces": [
{
"scopeId": "<string>",
"gitNamespaceId": "<string>"
}
],
"dismissedToasts": [
{
"name": "<string>",
"dismissals": [
{
"scopeId": "<string>",
"createdAt": 123
}
]
}
],
"favoriteProjectsAndSpaces": [
{
"teamId": "<string>",
"projectId": "<string>"
}
],
"remoteCaching": {
"enabled": true
},
"dataCache": {
"excessBillingEnabled": true
},
"featureBlocks": {
"webAnalytics": {
"isCurrentlyBlocked": true,
"blockedFrom": 123,
"blockedUntil": 123
}
}
}
}Default authentication mechanism
Successful response.
Successful response.
Data for the currently authenticated User.
Show child attributes
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.
Show child attributes
SUBSCRIPTION_CANCELED, SUBSCRIPTION_EXPIRED, UNPAID_INVOICE, ENTERPRISE_TRIAL_ENDED, FAIR_USE_LIMITS_EXCEEDED, BLOCKED_FOR_PLATFORM_ABUSE analyticsUsage, artifacts, bandwidth, blobTotalAdvancedRequests, blobTotalAvgSizeInBytes, blobTotalGetResponseObjectSizeInBytes, blobTotalSimpleRequests, connectDataTransfer, dataCacheRead, dataCacheWrite, edgeConfigRead, edgeConfigWrite, edgeFunctionExecutionUnits, edgeMiddlewareInvocations, edgeRequestAdditionalCpuDuration, edgeRequest, elasticConcurrencyBuildSlots, fastDataTransfer, fastOriginTransfer, fluidCpuDuration, fluidDuration, functionDuration, functionInvocation, imageOptimizationCacheRead, imageOptimizationCacheWrite, imageOptimizationTransformation, logDrainsVolume, monitoringMetric, blobDataTransfer, observabilityEvent, onDemandConcurrencyMinutes, runtimeCacheRead, runtimeCacheWrite, serverlessFunctionExecution, sourceImages, 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.
Show child attributes
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.
Show child attributes
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.
Show child attributes
An object containing infomation related to the amount of platform resources may be allocated to the User account.
SKIP_NAMESPACE_QUEUE, WAIT_FOR_NAMESPACE_QUEUE 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.
Show child attributes
An object containing infomation related to the amount of platform resources may be allocated to the User account.
enhanced, turbo 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.
Show child attributes
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.
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.
set of dashboard view preferences (cards or list) per scopeId
Show child attributes
list, cards open, closed open, closed gitlab, bitbucket, github, github-limited, github-custom-host A record of when, under a certain scopeId, a toast was dismissed