Unable to pass environment variables in vercel.json cronjob
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
I am trying to call an api with a vercel cronjob, the API requires a key that is saved in environment variables
.env . I need a help on how I can access the environment variables while in verce.json{
"crons": [
{
"path": "/api/my-api?authorization=${KEY_IN_ENV}",
"schedule": "0 7 * * 4"
}
]
}2 Replies
@Masai Lion I am trying to call an api with a vercel cronjob, the API requires a key that is saved in environment variables `.env` . I need a help on how I can access the environment variables while in `verce.json`
json
{
"crons": [
{
"path": "/api/my-api?authorization=${KEY_IN_ENV}",
"schedule": "0 7 * * 4"
}
]
}
unfortunately it is a known limitation and you can't do this at the moment as far as i know
Masai LionOP
Alright, thanks