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

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

async function run() {
  const result = await vercel.authentication.listAuthTokens();

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

run();
{
  "tokens": [
    {
      "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
    }
  ],
  "testingToken": {
    "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
  },
  "pagination": {
    "count": 20,
    "next": 1540095775951,
    "prev": 1540095775951
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Response

200
application/json
tokens
object[]
required

Authentication token metadata.

pagination
object
required

This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data.

testingToken
object

Authentication token metadata.