Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
List Auth Tokens
Retrieve a list of the current User’s authentication 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
Default authentication mechanism
Response
Authentication token metadata.
The unique identifier of the token.
"5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391"
The human-readable name of the token.
The type of the token.
"oauth2-token"
Timestamp (in milliseconds) of when the token was most recently used.
1632816536002
Timestamp (in milliseconds) of when the token was created.
1632816536002
The origin of how the token was created.
"github"
The access scopes granted to the token.
The access scopes granted to the token.
user
saml
, github
, gitlab
, bitbucket
, email
, manual
, passkey
, otp
, sms
, invite
, google
Timestamp (in milliseconds) of when the token expires.
1632816536002
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.
Amount of items in the current page.
20
Timestamp that must be used to request the next page.
1540095775951
Timestamp that must be used to request the previous page.
1540095775951
Authentication token metadata.
The unique identifier of the token.
"5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391"
The human-readable name of the token.
The type of the token.
"oauth2-token"
Timestamp (in milliseconds) of when the token was most recently used.
1632816536002
Timestamp (in milliseconds) of when the token was created.
1632816536002
The origin of how the token was created.
"github"
The access scopes granted to the token.
The access scopes granted to the token.
user
saml
, github
, gitlab
, bitbucket
, email
, manual
, passkey
, otp
, sms
, invite
, google
Timestamp (in milliseconds) of when the token expires.
1632816536002
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
}
}