1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. UserToken
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse
vercel logo
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse

    Provides a User Token resource.

    A User Token is an authentication token that can be used to access the Vercel API.

    Creating user tokens requires a Vercel API token with full account access. Limited tokens cannot create additional user tokens.

    The bearer_token value is only returned during creation and cannot be retrieved again later. Imported resources will not populate bearer_token.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.UserToken("example", {name: "example-token"});
    const exampleExpiring = new vercel.UserToken("example_expiring", {
        name: "example-expiring-token",
        expiresAt: 1767225600000,
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.UserToken("example", name="example-token")
    example_expiring = vercel.UserToken("example_expiring",
        name="example-expiring-token",
        expires_at=1767225600000)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vercel.NewUserToken(ctx, "example", &vercel.UserTokenArgs{
    			Name: pulumi.String("example-token"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewUserToken(ctx, "example_expiring", &vercel.UserTokenArgs{
    			Name:      pulumi.String("example-expiring-token"),
    			ExpiresAt: pulumi.Int(1767225600000),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.UserToken("example", new()
        {
            Name = "example-token",
        });
    
        var exampleExpiring = new Vercel.UserToken("example_expiring", new()
        {
            Name = "example-expiring-token",
            ExpiresAt = 1767225600000,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.vercel.UserToken;
    import com.pulumiverse.vercel.UserTokenArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new UserToken("example", UserTokenArgs.builder()
                .name("example-token")
                .build());
    
            var exampleExpiring = new UserToken("exampleExpiring", UserTokenArgs.builder()
                .name("example-expiring-token")
                .expiresAt(1767225600000)
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:UserToken
        properties:
          name: example-token
      exampleExpiring:
        type: vercel:UserToken
        name: example_expiring
        properties:
          name: example-expiring-token
          expiresAt: 1.7672256e+12
    
    Example coming soon!
    

    Create UserToken Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UserToken(name: string, args?: UserTokenArgs, opts?: CustomResourceOptions);
    @overload
    def UserToken(resource_name: str,
                  args: Optional[UserTokenArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserToken(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  expires_at: Optional[int] = None,
                  name: Optional[str] = None,
                  team_id: Optional[str] = None)
    func NewUserToken(ctx *Context, name string, args *UserTokenArgs, opts ...ResourceOption) (*UserToken, error)
    public UserToken(string name, UserTokenArgs? args = null, CustomResourceOptions? opts = null)
    public UserToken(String name, UserTokenArgs args)
    public UserToken(String name, UserTokenArgs args, CustomResourceOptions options)
    
    type: vercel:UserToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_user_token" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args UserTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UserTokenArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UserTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserTokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var userTokenResource = new Vercel.UserToken("userTokenResource", new()
    {
        ExpiresAt = 0,
        Name = "string",
        TeamId = "string",
    });
    
    example, err := vercel.NewUserToken(ctx, "userTokenResource", &vercel.UserTokenArgs{
    	ExpiresAt: pulumi.Int(0),
    	Name:      pulumi.String("string"),
    	TeamId:    pulumi.String("string"),
    })
    
    resource "vercel_user_token" "userTokenResource" {
      lifecycle {
        create_before_destroy = true
      }
      expires_at = 0
      name       = "string"
      team_id    = "string"
    }
    
    var userTokenResource = new UserToken("userTokenResource", UserTokenArgs.builder()
        .expiresAt(0)
        .name("string")
        .teamId("string")
        .build());
    
    user_token_resource = vercel.UserToken("userTokenResource",
        expires_at=0,
        name="string",
        team_id="string")
    
    const userTokenResource = new vercel.UserToken("userTokenResource", {
        expiresAt: 0,
        name: "string",
        teamId: "string",
    });
    
    type: vercel:UserToken
    properties:
        expiresAt: 0
        name: string
        teamId: string
    

    UserToken Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The UserToken resource accepts the following input properties:

    ExpiresAt int
    The Unix timestamp in milliseconds when the token should expire.
    Name string
    The human-readable name of the token.
    TeamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    ExpiresAt int
    The Unix timestamp in milliseconds when the token should expire.
    Name string
    The human-readable name of the token.
    TeamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    expires_at number
    The Unix timestamp in milliseconds when the token should expire.
    name string
    The human-readable name of the token.
    team_id string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    expiresAt Integer
    The Unix timestamp in milliseconds when the token should expire.
    name String
    The human-readable name of the token.
    teamId String
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    expiresAt number
    The Unix timestamp in milliseconds when the token should expire.
    name string
    The human-readable name of the token.
    teamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    expires_at int
    The Unix timestamp in milliseconds when the token should expire.
    name str
    The human-readable name of the token.
    team_id str
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    expiresAt Number
    The Unix timestamp in milliseconds when the token should expire.
    name String
    The human-readable name of the token.
    teamId String
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UserToken resource produces the following output properties:

    ActiveAt int
    The Unix timestamp in milliseconds when the token was last active.
    BearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    CreatedAt int
    The Unix timestamp in milliseconds when the token was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LeakedAt int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    LeakedUrl string
    The URL where the token was discovered as leaked.
    Origin string
    How the token was created.
    Prefix string
    The token prefix used for identification.
    Suffix string
    The token suffix used for identification.
    Type string
    The type of the token.
    ActiveAt int
    The Unix timestamp in milliseconds when the token was last active.
    BearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    CreatedAt int
    The Unix timestamp in milliseconds when the token was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LeakedAt int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    LeakedUrl string
    The URL where the token was discovered as leaked.
    Origin string
    How the token was created.
    Prefix string
    The token prefix used for identification.
    Suffix string
    The token suffix used for identification.
    Type string
    The type of the token.
    active_at number
    The Unix timestamp in milliseconds when the token was last active.
    bearer_token string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    created_at number
    The Unix timestamp in milliseconds when the token was created.
    id string
    The provider-assigned unique ID for this managed resource.
    leaked_at number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leaked_url string
    The URL where the token was discovered as leaked.
    origin string
    How the token was created.
    prefix string
    The token prefix used for identification.
    suffix string
    The token suffix used for identification.
    type string
    The type of the token.
    activeAt Integer
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken String
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt Integer
    The Unix timestamp in milliseconds when the token was created.
    id String
    The provider-assigned unique ID for this managed resource.
    leakedAt Integer
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl String
    The URL where the token was discovered as leaked.
    origin String
    How the token was created.
    prefix String
    The token prefix used for identification.
    suffix String
    The token suffix used for identification.
    type String
    The type of the token.
    activeAt number
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt number
    The Unix timestamp in milliseconds when the token was created.
    id string
    The provider-assigned unique ID for this managed resource.
    leakedAt number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl string
    The URL where the token was discovered as leaked.
    origin string
    How the token was created.
    prefix string
    The token prefix used for identification.
    suffix string
    The token suffix used for identification.
    type string
    The type of the token.
    active_at int
    The Unix timestamp in milliseconds when the token was last active.
    bearer_token str
    The actual token value. This is only returned during create and then preserved from Terraform state.
    created_at int
    The Unix timestamp in milliseconds when the token was created.
    id str
    The provider-assigned unique ID for this managed resource.
    leaked_at int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leaked_url str
    The URL where the token was discovered as leaked.
    origin str
    How the token was created.
    prefix str
    The token prefix used for identification.
    suffix str
    The token suffix used for identification.
    type str
    The type of the token.
    activeAt Number
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken String
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt Number
    The Unix timestamp in milliseconds when the token was created.
    id String
    The provider-assigned unique ID for this managed resource.
    leakedAt Number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl String
    The URL where the token was discovered as leaked.
    origin String
    How the token was created.
    prefix String
    The token prefix used for identification.
    suffix String
    The token suffix used for identification.
    type String
    The type of the token.

    Look up Existing UserToken Resource

    Get an existing UserToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UserTokenState, opts?: CustomResourceOptions): UserToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active_at: Optional[int] = None,
            bearer_token: Optional[str] = None,
            created_at: Optional[int] = None,
            expires_at: Optional[int] = None,
            leaked_at: Optional[int] = None,
            leaked_url: Optional[str] = None,
            name: Optional[str] = None,
            origin: Optional[str] = None,
            prefix: Optional[str] = None,
            suffix: Optional[str] = None,
            team_id: Optional[str] = None,
            type: Optional[str] = None) -> UserToken
    func GetUserToken(ctx *Context, name string, id IDInput, state *UserTokenState, opts ...ResourceOption) (*UserToken, error)
    public static UserToken Get(string name, Input<string> id, UserTokenState? state, CustomResourceOptions? opts = null)
    public static UserToken get(String name, Output<String> id, UserTokenState state, CustomResourceOptions options)
    resources:  _:    type: vercel:UserToken    get:      id: ${id}
    import {
      to = vercel_user_token.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ActiveAt int
    The Unix timestamp in milliseconds when the token was last active.
    BearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    CreatedAt int
    The Unix timestamp in milliseconds when the token was created.
    ExpiresAt int
    The Unix timestamp in milliseconds when the token should expire.
    LeakedAt int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    LeakedUrl string
    The URL where the token was discovered as leaked.
    Name string
    The human-readable name of the token.
    Origin string
    How the token was created.
    Prefix string
    The token prefix used for identification.
    Suffix string
    The token suffix used for identification.
    TeamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    Type string
    The type of the token.
    ActiveAt int
    The Unix timestamp in milliseconds when the token was last active.
    BearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    CreatedAt int
    The Unix timestamp in milliseconds when the token was created.
    ExpiresAt int
    The Unix timestamp in milliseconds when the token should expire.
    LeakedAt int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    LeakedUrl string
    The URL where the token was discovered as leaked.
    Name string
    The human-readable name of the token.
    Origin string
    How the token was created.
    Prefix string
    The token prefix used for identification.
    Suffix string
    The token suffix used for identification.
    TeamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    Type string
    The type of the token.
    active_at number
    The Unix timestamp in milliseconds when the token was last active.
    bearer_token string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    created_at number
    The Unix timestamp in milliseconds when the token was created.
    expires_at number
    The Unix timestamp in milliseconds when the token should expire.
    leaked_at number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leaked_url string
    The URL where the token was discovered as leaked.
    name string
    The human-readable name of the token.
    origin string
    How the token was created.
    prefix string
    The token prefix used for identification.
    suffix string
    The token suffix used for identification.
    team_id string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    type string
    The type of the token.
    activeAt Integer
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken String
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt Integer
    The Unix timestamp in milliseconds when the token was created.
    expiresAt Integer
    The Unix timestamp in milliseconds when the token should expire.
    leakedAt Integer
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl String
    The URL where the token was discovered as leaked.
    name String
    The human-readable name of the token.
    origin String
    How the token was created.
    prefix String
    The token prefix used for identification.
    suffix String
    The token suffix used for identification.
    teamId String
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    type String
    The type of the token.
    activeAt number
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken string
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt number
    The Unix timestamp in milliseconds when the token was created.
    expiresAt number
    The Unix timestamp in milliseconds when the token should expire.
    leakedAt number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl string
    The URL where the token was discovered as leaked.
    name string
    The human-readable name of the token.
    origin string
    How the token was created.
    prefix string
    The token prefix used for identification.
    suffix string
    The token suffix used for identification.
    teamId string
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    type string
    The type of the token.
    active_at int
    The Unix timestamp in milliseconds when the token was last active.
    bearer_token str
    The actual token value. This is only returned during create and then preserved from Terraform state.
    created_at int
    The Unix timestamp in milliseconds when the token was created.
    expires_at int
    The Unix timestamp in milliseconds when the token should expire.
    leaked_at int
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leaked_url str
    The URL where the token was discovered as leaked.
    name str
    The human-readable name of the token.
    origin str
    How the token was created.
    prefix str
    The token prefix used for identification.
    suffix str
    The token suffix used for identification.
    team_id str
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    type str
    The type of the token.
    activeAt Number
    The Unix timestamp in milliseconds when the token was last active.
    bearerToken String
    The actual token value. This is only returned during create and then preserved from Terraform state.
    createdAt Number
    The Unix timestamp in milliseconds when the token was created.
    expiresAt Number
    The Unix timestamp in milliseconds when the token should expire.
    leakedAt Number
    The Unix timestamp in milliseconds when the token was marked as leaked.
    leakedUrl String
    The URL where the token was discovered as leaked.
    name String
    The human-readable name of the token.
    origin String
    How the token was created.
    prefix String
    The token prefix used for identification.
    suffix String
    The token suffix used for identification.
    teamId String
    The ID of the Vercel team scope for this token. Required when creating a team-scoped token if a default team has not been set in the provider.
    type String
    The type of the token.

    Import

    The pulumi import command can be used, for example:

    If importing into a personal account, or with a team configured on the provider, simply use the token ID.

    • token_id can be found in the Vercel UI under Account Settings, Tokens.
    $ pulumi import vercel:index/userToken:UserToken example 5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391
    

    Alternatively, you can import via the team_id and token_id.

    • team_id can be found in the team settings tab in the Vercel UI.
    • token_id can be found in the Vercel UI under Account Settings, Tokens.
    $ pulumi import vercel:index/userToken:UserToken example team_xxxxxxxxxxxxxxxxxxxxxxxx/5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Viewing docs for Vercel v5.4.1
    published on Wednesday, Jul 22, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial