ns_client | R Documentation |
This function initializes an OAuth2 client using the 'httr2::oauth_client' function. It is used to authenticate and interact with the Nettskjema API.
ns_client(client_id, client_secret, client_name = "nettskjemar")
client_id |
[character] The client ID provided by Nettskjema. |
client_secret |
[character] The client secret provided by Nettskjema. |
client_name |
[character] An optional name for the client (default = "nettskjemar"). |
A configured 'httr2::oauth_client' object.
# Example: Initialize an OAuth2 client for Nettskjema
client <- ns_client(
client_id = "your_client_id",
client_secret = "your_client_secret"
)
# Using a custom client name
client <- ns_client(
client_id = "your_client_id",
client_secret = "your_client_secret",
client_name = "custom_client_name"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.