Hello, I'm trying to do something similar to this post where I automatically create users from a list of users in another environment. I'm currently testing with my own ID which does not exist in the new env yet. When I the post I get a 400 response but the user never shows up in the user list in connect.
POST(paste0("https://ourconnecthost.com/__api__/v1/users"),
add_headers(Authorization = "api_key"),
body = list(username = testuser,
first_name = test,
last_name = user,
user_must_set_password = TRUE,
email = testuser@ourcompany.com),
encode = "json"
)
Response [https://ourconnecthost.com/__api__/v1/users]
Date: 2020-03-13 14:24
Status: 400
Content-Type: application/json
Size: 113 B
We're running our connect instance inside a docker container on load balanced servers, not sure if that changes whether or not the api will work? I've tried removing the "user_must_set_password" option and the encode json option, I still get a 400 response with no change in the user list. Maybe I need an addition parameter? Thank you in advance for thoughts!