Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- API Reference
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- logs
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
authentication
List Auth Tokens
Retrieve a list of the current User’s authentication tokens.
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
Default authentication mechanism
Response
200
application/json
The response is of type object
.
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
}
}