| create_integration | R Documentation |
Creates a new OAuth integration on the Posit Connect server. OAuth integrations allow content to access external resources using OAuth credentials.
You must have administrator privileges to perform this action.
See the Posit Connect documentation on OAuth integrations for more information.
create_integration(client, name, description = NULL, template, config)
client |
A |
name |
A descriptive name to identify the integration. |
description |
Optional, default |
template |
The template to use to configure this integration (e.g., "custom", "github", "google", "connect"). |
config |
A list containing the configuration for the integration. The required fields vary depending on the template selected. |
A connect_integration object representing the newly created
integration. See get_integration() for details on the returned object.
get_integrations(), get_integration(), update_integration(),
delete_integration()
Other oauth integration functions:
delete_integration(),
get_associations(),
get_integration(),
get_integrations(),
set_integrations(),
update_integration()
## Not run:
client <- connect()
# Create a GitHub OAuth integration
github_integration <- create_integration(
client,
name = "GitHub Integration",
description = "Integration with GitHub for OAuth access",
template = "github",
config = list(
client_id = "your-client-id",
client_secret = "your-client-secret"
)
)
# Create a custom OAuth integration
custom_integration <- create_integration(
client,
name = "Custom API Integration",
description = "Integration with our custom API",
template = "custom",
config = list(
auth_mode = "Confidential",
auth_type = "Viewer",
authorization_uri = "https://api.example.com/oauth/authorize",
client_id = "your-client-id",
client_secret = "your-client-secret",
token_uri = "https://api.example.com/oauth/token"
)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.