APIs & Integrations

raninir
Member

Error POST /settings/v3/users/ TypeError: UserProvisionRequest.__init__() got an unexpected keyword

Hello, 

I'm trying to use the example code from POST /settings/v3/users/ locally but I get the error
"TypeError: UserProvisionRequest.__init__() got an unexpected keyword argument 'first_name'".

https://developers.hubspot.com/docs/api/settings/user-provisioning

On the other hand, when testing it within the same page it works correctly

Testing, locally it only allows me to create a user with just the parameter
"email"

0 Upvotes
2 Replies 2
Mike_Eastwood
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

Error POST /settings/v3/users/ TypeError: UserProvisionRequest.__init__() got an unexpected keyword

Hi @raninir 

 

For some stange reason the User Provisioning API uses `firstName` rather than `firstname` everywhere else in the APIs.

 

Can you try using `firstName` instead of `first_name`?

 

Did that work?

Mike

 

Here to learn more about HubSpot and share my HubSpot Knowledge. I'm the founder of Webalite a Gold HubSpot Partner Agency based in Wellington, New Zealand and the founder of Portal-iQ the world's first automated HubSpot Portal Audit that helps you work smarter with HubSpot.

raninir
Member

Error POST /settings/v3/users/ TypeError: UserProvisionRequest.__init__() got an unexpected keyword

Hello @Mike_Eastwood , researching within the Hubspot libraries for python, the parameters for first_name or firstName and lastName and last_name are not there, for that reason it gave the mentioned error, by removing those parameters I can create the user only with the other parameters

0 Upvotes