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

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

async function run() {
  const result = await vercel.authentication.getAuthToken({
    tokenId: "5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391",
  });

  // 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
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

tokenId
string
required

The identifier of the token to retrieve. The special value "current" may be supplied, which returns the metadata for the token that the current HTTP request is authenticated with.

Example:

"5d9f2ebd38ddca62e5d51e9c1704c72530bdc8bfdd41e782a6687c48399e8391"

Response

200
application/json

Successful response.

token
object
required

Authentication token metadata.