import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.authentication.listAuthTokens();
console.log(result);
}
run();{
"tokens": [
{
"id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391",
"name": "<string>",
"type": "oauth2-token",
"activeAt": 1632816536002,
"createdAt": 1632816536002,
"origin": "github",
"scopes": [
{
"type": "user",
"createdAt": 123,
"sudo": {
"origin": "totp",
"expiresAt": 123
},
"origin": "saml",
"expiresAt": 123
}
],
"expiresAt": 1632816536002
}
],
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
}
}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();
console.log(result);
}
run();{
"tokens": [
{
"id": "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391",
"name": "<string>",
"type": "oauth2-token",
"activeAt": 1632816536002,
"createdAt": 1632816536002,
"origin": "github",
"scopes": [
{
"type": "user",
"createdAt": 123,
"sudo": {
"origin": "totp",
"expiresAt": 123
},
"origin": "saml",
"expiresAt": 123
}
],
"expiresAt": 1632816536002
}
],
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
}
}Default authentication mechanism
Show child attributes
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.
Show child attributes
user saml, github, gitlab, bitbucket, email, manual, passkey, otp, sms, invite, google, apple, app 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.
Show child attributes
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