POST
/
v3
/
user
/
tokens
import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.authentication.createAuthToken({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
    requestBody: {
      name: "<value>",
    },
  });

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

run();
{
  "token": {
    "id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391",
    "name": "<string>",
    "type": "oauth2-token",
    "origin": "github",
    "scopes": [
      {
        "type": "user",
        "sudo": {
          "origin": "totp",
          "expiresAt": 123
        },
        "origin": "saml",
        "createdAt": 123,
        "expiresAt": 123
      }
    ],
    "expiresAt": 1632816536002,
    "activeAt": 1632816536002,
    "createdAt": 1632816536002
  },
  "bearerToken": "uRKJSTt0L4RaSkiMj41QTkxM"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json
name
string
required
expiresAt
number

Response

200
application/json

Successful response.

token
object
required

Authentication token metadata.

bearerToken
string
required

The authentication token's actual value. This token is only provided in this response, and can never be retrieved again in the future. Be sure to save it somewhere safe!

Example:

"uRKJSTt0L4RaSkiMj41QTkxM"