if (FALSE) {
# Get all OAuth integrations
integrations <- getOAuthIntegrations()
# Show all integrations
for (int in integrations) {
cat(sprintf("%s (%s): %s\n",
int$name,
int$guid,
if (int$authenticated) "authenticated" else "not authenticated"))
}
# Filter to authenticated integrations only
authenticated <- Filter(function(x) x$authenticated, integrations)
# Get credentials for the first authenticated integration
if (length(authenticated) > 0) {
creds <- getOAuthCredentials(audience = authenticated[[1]]$guid)
}
}
Run the code above in your browser using DataLab