Get Environment Variable

Retrieves a specific environment variable for a given project by its ID, including its value.

GET /projects/{projectId}/env-vars/{environmentVariableId}
import { v0 } from 'v0-sdk'

const result = await v0.projects.getEnvVar({
  projectId: 'project_abc123',
  environmentVariableId: 'env_def456',
  decrypted: 'true'
})

console.log(result)

Parameters

Path Parameters

projectId string Required

The unique identifier of the project that owns the environment variable.


environmentVariableId string Required

The unique identifier of the environment variable to retrieve.


Query Parameters

decrypted enum

Whether to return decrypted values. Defaults to false (encrypted).

Possible values:

  • true
  • false

Response

Response Body

object string Required


data string Required