Retrieve the decrypted value of a Shared Environment Variable by id.
GET
https://api.vercel.com/v1/env/{id}Retrieve the decrypted value of a Shared Environment Variable by id.
https://api.vercel.com/v1/env/{id}
const response = await fetch('https://api.vercel.com/v1/env/id?teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "applyToAllCustomEnvironments": "false", "comment": "string", "created": "2021-02-10T13:11:49.180Z", "createdAt": "1609492210000", "createdBy": "2qDDuGFTWXBLDNnqZfWPDp1A", "customEnvironmentIds": [], "decrypted": "false", "deletedAt": "1609492210000", "deletedBy": "2qDDuGFTWXBLDNnqZfWPDp1A", "id": "env_XCG7t7AIHuO2SBA8667zNUiM", "key": "my-api-key", "lastEditedByDisplayName": "Example Name", "lastEditedByPrincipal": { "avatar": "string", "id": "icfg_1234567890", "name": "Example Name", "type": "user", "username": "string" }, "ownerId": "team_LLHUOMOoDlqOp8wPE4kFo9pE", "projectId": [], "target": [], "type": "encrypted", "updatedAt": "1609492210000", "updatedBy": "2qDDuGFTWXBLDNnqZfWPDp1A", "value": "string"}AuthorizationbearerToken
Default authentication mechanism
200Success
whether or not this env varible applies to custom environments
400One 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
410Error