Initiates the OAuth 2.0 Authorization Code flow. This opens a browser window for the user to log in and authorize the application, then prompts for the authorization code to exchange for access tokens.
Details
The OAuth flow:
Opens a browser to Egnyte's authorization page
User logs in (via SSO if configured) and approves access
Egnyte redirects to your configured redirect_uri with
?code=...Copy the code from the URL and paste it when prompted
The code is exchanged for access and refresh tokens
Note: Egnyte requires HTTPS redirect URIs. After authorization, you'll
be redirected to your configured URI. Copy the code parameter from the
URL (everything after code= and before any &).
Access tokens expire after 30 days. Use eg_oauth_refresh() to obtain
a new token using the refresh token.
See also
eg_oauth_app() to configure the OAuth application first.
Examples
if (FALSE) { # \dontrun{
# First set up your OAuth app
eg_oauth_app("mycompany", "client_id", "client_secret",
redirect_uri = "https://your-app.com/callback")
# Then authorize (opens browser, prompts for code)
eg_oauth_authorize()
# Now you can use eg_read() and eg_write()
eg_read("/Shared/Documents/file.txt", "local.txt")
} # }