Fix variable name for defaulting appid from environment

Fix copy/paste error where the app id was assigned to `secret` instead of `appid`.