Create User Domo API with R in Rstudio HTTR 400 status

------Where I got the instructions------



Content-Type: application/json

Accept: application/json

Authorization: bearer <your-valid-oauth-access-token>


"title": "Software Engineer",

"email": "[email protected]",

"alternateEmail": "[email protected]",

"role": "Admin",

"phone": "888-361-1078",

"name": "Leonhard Euler",

"location": "American Fork",

"timezone": "",

"locale": "",

"employeeNumber": 23432



------------What was the result-------------

I'm trying to create a new user using HTTR in Domo. I keep getting a 400 error. I believe that the issue is with my "body = w" from below.


                   response []
                   Status: 400
                   Content-Type: application/json;charset=utf-8




------What I did------

library(curl) #interface to libcurl (to make API calls)
library(jsonlite) #convert json to list objects in R
library(httr) #GET and POST methods through https, etc.


name <- 'Joshua James'
email <- '[email protected]'
role <- 'Participant'

#build API call
auth <- 123456789........
url <- paste('', 200, sep='')


#dynamically build the body of the post
w = paste('{ \"title\":[',"",'],
}',sep = " ")


#create the new user
httr::POST(url=url, add_headers("Content-Type" = "application/json", "Accept" = "application/json", "Authorization" = auth), body = w)


  • Hi Joshua


    There are a number of reasons that a 400 error can be returned. I would reach out to support and see if they have any logs that give anything specific. Before that, though I would double your access tokens and other account-specific information.



This discussion has been closed.