Get a Connect token
POST
https://api.vercel.com/v1/connect/token/{connector}Get an access token for a connector identified by the path parameter and scoped to the requester.
https://api.vercel.com/v1/connect/token/{connector}
const response = await fetch('https://api.vercel.com/v1/connect/token/connector', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "subject": { "type": "app" }, "installationId": "example_id", "audience": [], "scopes": [], "resources": [], "authorizationDetails": [ { "type": "string" } ], "validityBufferMs": "123" }),});
const data = await response.json();console.log(data);Response
{ "authorizationId": "example_id", "claims": "value", "connector": { "id": "icfg_1234567890", "type": "string", "uid": "example_id" }, "expiresAt": "123", "externalSubject": "string", "installationId": "example_id", "metadata": "value", "name": "Example Name", "tenantId": "example_id", "token": "string", "tokenGroupId": "example_id", "tokenId": "example_id"}AuthorizationbearerToken
Default authentication mechanism
200Success
Claims extracted from the provider's tokens per the connector's
ForwardedClaims allow-list. Currently sourced from the OIDC id_token only.Stable id that groups all tokens with the same parameters across refreshes.
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
409Error
410Error
422Error
429Error