Skip to content

← All questions

Unresolved variable ${API_TOKEN} at "env.api.auth.token" — where is it supposed to look?

Asked 16,240 views2 answers

Added bearer auth to the staging environment file:

yaml
api:
  baseUrl: https://jsonplaceholder.typicode.com
  auth: { type: bearer, token: "${API_TOKEN}" }

Then:

bash
sdods run -p demo-shop -e staging -l api

It dies before a single request goes out:

text
✖ CONFIG_UNRESOLVED_VAR: Unresolved variable ${API_TOKEN} at "env.api.auth.token".
  hint: Add API_TOKEN=... to .env or .env.<env> (repo root or project folder), or export it in the shell.
  docs: https://docs.sdods.com/docs/guides/configuration

The value is in a file next to the project yaml called env.staging. What am I missing?

asked by Dinuka Perera412 ·

2 answers

Have the same question?

Ask it with the command you ran and the output you got, and it will be answered here.

Ask a question

Related