Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth_service_token's documentation on scope is unclear #389

Closed
jarodmeng opened this issue Aug 5, 2016 · 0 comments
Closed

oauth_service_token's documentation on scope is unclear #389

jarodmeng opened this issue Aug 5, 2016 · 0 comments

Comments

@jarodmeng
Copy link

oauth_service_token's documentation on its scope argument is

a character vector of scopes to request.

The function actually only allows a length 1 character vector.

if (!is.null(scope) && !(is.character(scope) && length(scope) == 1))
stop("`scope` must be a length 1 character vector.", call. = FALSE)

I don't know why it only accepts length 1 character vector, but if that's the case, the function documentation should state the requirement explicitly.

Also, it turns out that user can collapse a list of scopes by spaces and supply the collapsed string to scope. This feature is not documented anywhere and is hard to discover.

@hadley hadley closed this as completed in 1f78c92 Jul 24, 2017
jiwalker-usgs pushed a commit to jiwalker-usgs/httr that referenced this issue Jul 24, 2017
And use in oauth_service_token(). Fixes r-lib#389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants