% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tokens.R
\name{af_store_token}
\alias{af_store_token}
\title{Store an API token in an environment variable}
\usage{
af_store_token(name, token, service = "apifetch")
}
\arguments{
\item{name}{The identifier for this token (e.g. a dataset or resource name).}

\item{token}{The authentication token (character).}

\item{service}{A namespace prefix grouping tokens for one API. Default
\code{"apifetch"}.}
}
\value{
Invisibly \code{NULL}; called for its side effect.
}
\description{
Stores an authentication token in a process environment variable named
\code{"<service>_<name>"}. The token is never written to disk. If a non-empty
variable with that name already exists, the function refuses to overwrite it.
}
\examples{
bdpe <- af_store_token("dengue", "your-token-here", service = "BigDataPE")
}
