login: Log in to the Generable API

View source: R/geco_api.R

loginR Documentation

Log in to the Generable API

Description

This function logs the user into the Generable API.

Usage

login(user, password, host)

Arguments

user

User email address. If not provided, will read the 'GECO_API_USER' environment variable.

password

User password. If not provided, will read the 'GECO_API_PASSWORD' environment variable.

Details

This function logs the user into the Generable API. The user must log in before calling other functions that require authentication. The authentication token for the API is stored in the rgeco package's environment. The token expires when the Generable API is not access within 30 minutes. If this happens, reauthenticate using this function.

When this call is successful, it will return the OAuth 2.0 Bearer Token for the user, invisibly. Otherwise, it will error with an error message.

Value

The OAuth 2.0 Bearer Token for the Generable API


generable/rgeco documentation built on Oct. 16, 2024, 2:45 a.m.