-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Question: how to pass additional vars within authenticate? #625
Comments
Hi, From the API DOC your API is supporting Oauth2 authentication using Resource Owner Password Credentials Grant that uses For Oauth2 API you would usually use You would need to do it yourself. From the doc (I did not try), you would need to use a This should work: username <- "my_username"
password <- "my_psw"
base_url = "https://api.checkbox.com/v1/my_account/oauth2/token"
response <- POST(url=base_url,
# pass data to the POST request
body = list(
username = username,
password = password,
grant_type = "password"
),
# application/x-www-form-urlencoded
encode = "form",
verbose()) Can you check ? |
related to #564 about the same type of grant |
Thanks!
|
httr has been superseded in favour of httr2, so is no longer under active development. If this problem is still important to you in httr2, I'd suggest filing an issue offer there 😄 — but httr2 provides much stronger OAuth support and what you want is likely to be https://httr2.r-lib.org/dev/reference/req_oauth_password.html. Thanks for using httr! |
Probably not an issue but I have asked the question here
I have a weird api setting an additional static variable in the call
grant_type=password
. I am not sure how to pass it withinauthenticate
method? any pointers would be helpful.Ps I can authenticate using python without any issues
The text was updated successfully, but these errors were encountered: