<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 500 Internal Server Error When Creating New Users in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907355#M70388</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/508609"&gt;@TWallen&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Some additional information relating to the API request that is resulting in this error might be helpful. For example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Request method (e.g. POST, GET)&lt;/LI&gt;
&lt;LI&gt;Request headers&lt;/LI&gt;
&lt;LI&gt;Request URL (incl. any query string params)&lt;/LI&gt;
&lt;LI&gt;Request body&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also, when you say "custom action", is that a &lt;A href="https://developers.hubspot.com/docs/api/workflows/custom-code-actions" target="_blank" rel="noopener"&gt;HubSpot custom code workflow action&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 04:15:10 GMT</pubDate>
    <dc:creator>zach_threadint</dc:creator>
    <dc:date>2024-03-05T04:15:10Z</dc:date>
    <item>
      <title>500 Internal Server Error When Creating New Users</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907313#M70387</link>
      <description>&lt;P&gt;Workato is our integration platform to connect HubSpot with our ERP system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the last year, we've had an integration to create HubSpot users from the ERP system employees. We've created a custom action to Create the User following this documentation:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/settings/user-provisioning" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/settings/user-provisioning&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything has worked well until the last few weeks. Recently, we started to receive the following error:&amp;nbsp;&lt;SPAN&gt;500 Internal Server Error: {"status":"error","message":"internal error","correlationId":"a71f1330-7e98-4a15-a0e6-dacf53ba3d17"}.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know what more information you need to help us identify why we get this issue.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 23:00:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907313#M70387</guid>
      <dc:creator>TWallen</dc:creator>
      <dc:date>2024-01-17T23:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: 500 Internal Server Error When Creating New Users</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907355#M70388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/508609"&gt;@TWallen&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Some additional information relating to the API request that is resulting in this error might be helpful. For example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Request method (e.g. POST, GET)&lt;/LI&gt;
&lt;LI&gt;Request headers&lt;/LI&gt;
&lt;LI&gt;Request URL (incl. any query string params)&lt;/LI&gt;
&lt;LI&gt;Request body&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also, when you say "custom action", is that a &lt;A href="https://developers.hubspot.com/docs/api/workflows/custom-code-actions" target="_blank" rel="noopener"&gt;HubSpot custom code workflow action&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 04:15:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907355#M70388</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T04:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: 500 Internal Server Error When Creating New Users</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907790#M70401</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&amp;nbsp;Thank you for your response. We are using the POST method. Our path is&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://api.hubapi.com/settings/v3/users/" target="_blank"&gt;https://api.hubapi.com/settings/v3/users/&lt;/A&gt;&lt;/STRONG&gt;.&amp;nbsp; The custom action is an option in Workato to build our own HubSpot action with a HTTP request.&lt;BR /&gt;&lt;BR /&gt;Screenshot of the request type and body parameters. Also below is a screenshot of our response body.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TWallen_0-1705594843057.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/107342i2E6697FE4D578025/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TWallen_0-1705594843057.png" alt="TWallen_0-1705594843057.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TWallen_1-1705594853808.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/107343i817442D9AF802D2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TWallen_1-1705594853808.png" alt="TWallen_1-1705594853808.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 16:23:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907790#M70401</guid>
      <dc:creator>TWallen</dc:creator>
      <dc:date>2024-01-18T16:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: 500 Internal Server Error When Creating New Users</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907792#M70402</link>
      <description>&lt;LI-CODE lang="markup"&gt;{
	"mnemonic": "Create User",
	"verb": "post",
	"response_type": "json",
	"path": "https://api.hubapi.com/settings/v3/users/",
	"input": {
		"schema": "[{\"name\":\"email\",\"type\":\"string\",\"optional\":true,\"label\":\"email\",\"control_type\":\"text\"},{\"name\":\"roleId\",\"type\":\"string\",\"optional\":true,\"label\":\"roleid\",\"control_type\":\"text\"},{\"name\":\"sendWelcomeEmail\",\"type\":\"boolean\",\"optional\":true},{\"name\":\"primaryTeamId\",\"type\":\"string\",\"optional\":false,\"hint\":\"Primary Team ID\",\"control_type\":\"text\",\"label\":\"Primary team ID\"}]",
		"data": {
			"email": "example@waremalcomb.com",
			"sendWelcomeEmail": "false",
			"primaryTeamId": "",
			"roleId": "311438"
		}
	},
	"request_type": "json",
	"output": "[{\"name\":\"id\",\"type\":\"string\",\"optional\":false,\"hint\":\"Owner ID\",\"control_type\":\"text\",\"label\":\"ID\"},{\"name\":\"userId\",\"type\":\"integer\",\"optional\":false,\"control_type\":\"integer\",\"label\":\"User ID\",\"parse_output\":\"integer_conversion\"}]"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Above is our raw JSON for the input.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 16:24:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/907792#M70402</guid>
      <dc:creator>TWallen</dc:creator>
      <dc:date>2024-01-18T16:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: 500 Internal Server Error When Creating New Users</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/908151#M70417</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/508609"&gt;@TWallen&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I've just managed to replicate the issue you've described. Seems to be related to the empty "primaryTeamId" key-value pair. When the User you're trying to create isn't being added to a Team, I'd suggest omitting the "primaryTeamId" key from your request. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "email": "example@waremalcomb.com",
    "sendWelcomeEmail": "false",
    "roleId": "311438"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 04:09:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/500-Internal-Server-Error-When-Creating-New-Users/m-p/908151#M70417</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T04:09:22Z</dc:date>
    </item>
  </channel>
</rss>

