blob: 55358176fe254d482650a7e9a49e4642057c88cf [file] [log] [blame]
Marc Kupietza4f51d72025-01-25 16:23:18 +01001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/KorAPConnection.R
3\name{auth,KorAPConnection-method}
4\alias{auth,KorAPConnection-method}
5\alias{auth}
6\title{Authorize RKorAPClient}
7\usage{
Marc Kupietzf83d59a2025-02-01 14:48:30 +01008\S4method{auth}{KorAPConnection}(
9 kco,
10 app_id = generic_kor_app_id,
11 app_secret = NULL,
12 scope = kco@oauthScope
13)
Marc Kupietza4f51d72025-01-25 16:23:18 +010014}
15\arguments{
16\item{kco}{KorAPConnection object}
17
18\item{app_id}{OAuth2 application id. Defaults to the generic KorAP client application id.}
19
Marc Kupietzf83d59a2025-02-01 14:48:30 +010020\item{app_secret}{OAuth2 application secret. Used with confidential client applications. Defaults to \code{NULL}.}
21
Marc Kupietza4f51d72025-01-25 16:23:18 +010022\item{scope}{OAuth2 scope. Defaults to "search match_info".}
23}
24\value{
25KorAPConnection object with access token set in \verb{@accessToken}.
26}
27\description{
Marc Kupietza4f51d72025-01-25 16:23:18 +010028Authorize RKorAPClient to make KorAP queries and download results on behalf of the user.
29}
30\examples{
31\dontrun{
Marc Kupietz617266d2025-02-27 10:43:07 +010032kco <- KorAPConnection(verbose = TRUE) \%>\% auth()
Marc Kupietza5501652025-01-28 20:25:42 +010033df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})",
Marc Kupietza824d502025-05-02 15:40:23 +020034 leftContextSize = 1, rightContextSize = 0
35)
Marc Kupietza4f51d72025-01-25 16:23:18 +010036}
37
38}
39\seealso{
40\code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}}
Marc Kupietza8c40f42025-06-24 15:49:52 +020041
42Other initialization functions:
43\code{\link{KorAPConnection-class}},
44\code{\link{clearAccessToken,KorAPConnection-method}},
45\code{\link{persistAccessToken,KorAPConnection-method}}
Marc Kupietza4f51d72025-01-25 16:23:18 +010046}
Marc Kupietza8c40f42025-06-24 15:49:52 +020047\concept{initialization functions}