Fix #262 by replacing API refs with config/env vars.