Learn R Programming

impectR (version 2.5.3)

getAccessToken: Get an access token from the 'Impect' Customer API

Description

Get an access token from the 'Impect' Customer API

Usage

getAccessToken(
  username,
  password,
  token_url =
    "https://login.impect.com/auth/realms/production/protocol/openid-connect/token"
)

Value

a string containing a bearer token

Arguments

username

your 'IMPECT' username

password

your 'IMPECT' password

token_url

host specific token url

Examples

Run this code
# Toy example: this will error quickly (no credentials)
try(getAccessToken(username = "invalidUser", password = "invalidPassword"))

# Real usage: requires valid credentials
if (FALSE) {
  token <- getAccessToken(username = "yourUsername", password = "yourPassword")
}

Run the code above in your browser using DataLab