Create a Connect authorization request
POST
https://api.vercel.com/v1/connect/authorize/{connector}Create an authorization request for a connector and return the URL and verifier details needed to complete the flow.
https://api.vercel.com/v1/connect/authorize/{connector}
const response = await fetch('https://api.vercel.com/v1/connect/authorize/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", "returnUrl": "https://example.com", "webhook": "string", "prompt": "string", "deviceCode": "true", "expiresInMs": "123", "additionalParams": "value" }),});
const data = await response.json();console.log(data);Response
{ "connector": { "displayName": "Example Name", "id": "icfg_1234567890", "name": "Example Name", "service": "string", "serviceName": "Example Name", "type": "string", "uid": "example_id" }, "deviceCode": "string", "expiresAt": "123", "request": "string", "url": "https://example.com", "verifier": "string"}AuthorizationbearerToken
Default authentication mechanism
application/json
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