Hello, im getting the following error when trying to create a user through the hubspot api. Couldnt find any documentation about it and the error is very unclear to whats wrong.
This error happens for every single user that i try to create through the api.
Ive already try deleting some users to see if there was some sort of limit applied but that didnt work.
Ive also tried some different email addresses and removing the sendWelcomeEmail field altogether.
400 BAD REQUEST
{“status”:“error”,“message”:“User cannot be added at this time.”,“correlationId”:“eaa2b0b6-c627-4b37-99a4-18ce6bf3b066”,“category”:“VALIDATION_ERROR”}
Hey there! If I were troubleshooting I’d recommend the following steps: (1) Ensure you have the proper scope assigned. You need Standard Scopes settings.users.write and Granular Scopes crm.objects.users.write. (2) I would also go through your request with a fine tooth comb. Typically 400 errors mean that the request was malformed some how. I’d put my money on that especially given the VALIDATION_ERROR in the response.
If you haven’t read through it: here’s an article on user provisioning from hubspots API docs: Accounts Dashboard | HubSpot
Hopefully that helps! If so help the community by marking it as a solution.
Hey patrick!
Thanks for the response. I have the proper scopes assigned, The thing is that the request used to work and it sometimes does. Its just that one day it starts failing and then the other day it works again.
Ive already went through the documentation and my request is not malformed.
Hey, @EConnectors5 Like @patrick_adams mentioned, tracking down 400 errors is tough as it is likely something on your end. I just ran a quick test using the Add a User endpoint and was successful:
Hey jaycee.
I dont think its something on my end. The request is pretty straightforward and ive made it through postman multiple times to verify that im doing it correctly, checking back and forth with the hubspot documentation.
It will some days go forward and return a 201. But other days it will return a 400 for every user create request.
For example currently im not getting the error but it will happen again as it did many other times.